POV-Ray : Newsgroups : povray.beta-test : Restructured Parser wants Testing : Re: Restructured Parser wants Testing Server Time
4 May 2024 16:47:14 EDT (-0400)
  Re: Restructured Parser wants Testing  
From: clipka
Date: 23 May 2018 08:20:01
Message: <5b055c71$1@news.povray.org>
Am 23.05.2018 um 08:54 schrieb Thomas de Groot:

> Where the longer parse time comes from is in the while loop distributing
> the cubes. This loop resides in a separate inc file. and looks like this:
> 
> //==========================================================
> #local R1 = seed(1929);
> #local R2 = seed(9732);
> #local R3 = seed(6493);
> #local N1 = 4000;
> #local I  = 0;
> 
> #while (I <= N1)
>   #local Start = VRand_In_Obj(RocksBox, R1);
                   ^^^^^^^^^^^^
Unless you copied that to your file with the loop, that's a macro in a
different file...

>   #local Norm = <0, 0, 0>;
>   #local RockPos = trace(Landscape, Start, -y, Norm);
>   #declare Visible = IsObjectVisible(RockPos)
>   #if (Visible)
>     #if (vdot(Norm, y)>0.8 & RockPos.y<50.0*(0.8+rand(R1)*0.4) &
> RockF(RockPos.x,RockPos.y,RockPos.z)<0.5+rand(R1)*0.1 & RockPos.y>0 )
>       object {Rock
>         //scale (RockPos.y+(1/RockPos.y))*RRand(0.9, 1.1, R2)
                                            ^^^^^
>         scale RockPos.y*RRand(0.9, 1.1, R2)
                          ^^^^^
>         rotate RRand(-180, 180, R3)
                 ^^^^^
... as is this.

>         translate RockPos
>       }
>       #if (mod(I, N1/10) = 0)
>         #debug concat(" Rocks: ", str(I,5,0), "\n")
>       #end
>       #local I = I + 1;
>     #end  //slope & altitude
>   #end  //Visible
> #end

So yes, that pretty much explains the poor performance with the
overhauled parser -- or, more to the point, the better performance with
v3.8.0-alpha: The latter features cached macros, while the overhauled
parser currently has those disabled.

I would expect v3.7.0 to show roughly similar performance as the
overhauled parser.


Post a reply to this message

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