POV-Ray : Newsgroups : povray.beta-test : Cached Macros! : Re: Cached Macros! Server Time
29 Apr 2024 06:24:50 EDT (-0400)
  Re: Cached Macros!  
From: Thomas de Groot
Date: 18 Jul 2016 08:59:07
Message: <578cd29b$1@news.povray.org>
On 18-7-2016 11:48, clipka wrote:
> Am 18.07.2016 um 10:05 schrieb Thomas de Groot:
>> On 15-7-2016 1:15, clipka wrote:
>>> While I'm satisfied with the cross-file macro execution speed, I would
>>> like additional feedback from you guys about execution speed of macros
>>> declared in the same file. I see a slight increase there, too -- can you
>>> confirm?
>>
>> Slight? You are kidding! :-)
>
> Actually no, I'm not.
>
>> The speed increase is huge in fact compared to version 3.7.
>> With the attached quick-and-dirty scene I get the following results
>> using 1 million iterations:
>>
>> +av151; macro inside scene parsing time: 1 minute 5 seconds (65.988
>> seconds)
>> +av151; macro outside scene parsing time: 1 minute 6 seconds (66.971
>> seconds)
>>
>> V 3.7; macro inside scene parsing time: stopped parsing manually after
>> more than 10 minutes!
>
> I was quite puzzled about your results, until I saw your test scene, and
> found that the in-file macro you presumably tested actually calls
> various other macros, which are declared in rand.inc. So what you are
> actually measuring is the speed of macro invocations across file boundaries.
>
> With the macros RRand, VRand_In_Box and VRand_In_Obj moved to the scene
> itself and "rand.inc" no longer included, I actually see a noteworthy
> _slowdown_ in parsing time on my machine: about 60 seconds, as opposed
> to 45 seconds with 3.7.0.

You are right of course. I am so used to this kind of scene building 
that I forgot the rand.inc implications. I shall have to retest this 
better tomorrow.


-- 
Thomas


Post a reply to this message

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