POV-Ray : Newsgroups : povray.programming : Perl Interface Server Time
22 Dec 2024 12:28:22 EST (-0500)
  Perl Interface (Message 1 to 2 of 2)  
From: Rick Measham
Subject: Perl Interface
Date: 10 Mar 2005 01:39:52
Message: <422febb8@news.povray.org>
I seem to recall seeing mention of such a thing someplace, but I can't 
find it any more.

If it doesn't exist, I'll probably start hacking.

That being the case, here's a question I hope can be answered. Does a 
'while' loop in SDL save anything on the processing side?

ie, If I have a scene with 100 boxes, does POV-Ray prefer that I have a 
loop or that I have 100 boxes, or doe it not matter.

I imagine it doesn't matter.

In a while loop the file is quicker to read, however it needs to parse 
the loop which is processor time.

With 100 boxes the file takes longer to read, but there is no looping 
that needs to be taken care of.

Experts?


Post a reply to this message

From: Warp
Subject: Re: Perl Interface
Date: 10 Mar 2005 15:15:43
Message: <4230aaef@news.povray.org>
Rick Measham <rickm*at%isite.net.au> wrote:
> ie, If I have a scene with 100 boxes, does POV-Ray prefer that I have a 
> loop or that I have 100 boxes, or doe it not matter.

  It doesn't matter.
  Parsing 100 boxes is theoretically slightly faster because povray
doesn't have to parse "#while", "#declare" and "#end" 100 times
(which it has to do if you use a loop), but I suppose that the
difference in time is not that much.

> With 100 boxes the file takes longer to read, but there is no looping 
> that needs to be taken care of.

  I don't think it takes longer to read.
  POV-Ray doesn't cache the input. When it has to jump in the file, it
just seeks it and continues reading from the new position.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

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