POV-Ray : Newsgroups : povray.advanced-users : macro question : Re: macro question Server Time
5 Jul 2024 15:29:18 EDT (-0400)
  Re: macro question  
From: David Wallace
Date: 24 Mar 2008 15:24:40
Message: <47E80E1A.7070608@earthlink.net>
Jim Charter wrote:
> Charles C wrote:
>> I've been working with the assumption that an occasional call to an 
>> #included macro containing tight loop calling a second macro in the 
>> same #include file many times should be fairly efficient, based I 
>> think on posted tests from back-when and what Warp said again just now.
>> Charles
> Yeah, that would seem right, but that is the solution I didn't want to 
> use only because it would result in redundant copies of a macro that I 
> wrote precisely to isolate reusable code.  Oh well, it is really more 
> about design aesthetics than parse time anyway.
> 
> I wonder if it would make a difference if the whole thing was wrapped in 
> a macro.  I'll try some tests.

My parametric surface builder uses a macro in an included file to define the 
shape.  The #include code is in the parametric macro itself (called once), but 
the included macro is called thousands of times on occasion (once per vertex). 
I have noticed some lag if the grid is 100x100 or more.

What inefficiencies are involved with this type of process?

-- 
--------------
David Wallace
TenArbor Consulting
"Just In Time Cash"
www.tenarbor.com
1-866-572-CASH


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.