|
|
Shay <sah### [at] simcopartscom> wrote:
> The following piece of code has two sections. The first section parses
> in 18 seconds on this computer (p3 650m). The second section parses in
> only 9 seconds!!
This is a very known phenomenon which happens due to how macros are
parsed.
And due to how they are parsed the effect is even worse if the macro
is inside an include file instead of the current file. Try it.
If your macro performs some mathematical operation and returns the
result, the fastest way of optimizing this is to replace the macro
with a function (and then it doesn't even matter if the function
is in an include file or not).
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
|