POV-Ray : Newsgroups : povray.general : #declaring pre-made macro for identical repeated use? : Re: #declaring pre-made macro for identical repeated use? Server Time
30 Jul 2024 02:13:37 EDT (-0400)
  Re: #declaring pre-made macro for identical repeated use?  
From: Thomas de Groot
Date: 18 Dec 2009 04:10:16
Message: <4b2b46f8$1@news.povray.org>
In my experience, whatever the macro does, if it is intended to give always 
the same output, it is always more efficient to keep either macro or its 
output out of the while loop, but inside a union for instance. Otherwise it 
would not make too much difference (except maybe if the macro is very 
large); e.g.

#declare my_output = macro();
union {
#while (counter <= 200)
business as usial
#declare counter = counter+1;
#end
my_output //whatever that represents
}//end of union


Thomas


Post a reply to this message

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