POV-Ray : Newsgroups : povray.general : Pov race results. Server Time
6 Aug 2024 08:13:17 EDT (-0400)
  Pov race results. (Message 1 to 3 of 3)  
From: Shay
Subject: Pov race results.
Date: 3 Apr 2002 20:46:16
Message: <3cabb068$1@news.povray.org>
I am putting this up as a new topic because it will likely be interesting to
anyone. I asked earlier today about the best way to use a float to find a
vector.
example: Var = 3 ------> vector <Var*2, Var, Var/2>


JRG gave the solution which I was trying to avoid, using a separate function
for x, y, and z.

ABX scripted a complex function do deal with the problem
news:jltmaukpci64s7497l1qdr79asqpl6tpln@4ax.com

I ran each (plus a macro) through a loop 1 million times and recorded the
parse times:


*Macro*
Macro was the big loser at 1:31

*<Calculate_x(), Calculate_y(), Calculate_z()>*
*ABX pigment function*
These both parsed in 50 seconds.

Functions as expected are much faster than macros, but no difference in
parse times over 1 million iterations between three very simple functions
and one complex function.

 -Shay


Post a reply to this message

From:
Subject: Re: Pov race results.
Date: 4 Apr 2002 03:06:19
Message: <k22oaucfog1al5e38660hg1s3h23jub2qf@4ax.com>
On Thu, 4 Apr 2002 07:42:00 -0800, "Shay" <shi### [at] houstonrrcom> wrote:
> I am putting this up as a new topic because it will likely be interesting to
> anyone. I asked earlier today about the best way to use a float to find a
> vector.

I believed you perform such a test. I was relly interested in results.

> I ran each (plus a macro) through a loop 1 million times and recorded the
> parse times:
>
> *Macro*
> Macro was the big loser at 1:31

1 minute 30 sec or 1 hour 30 minutes ?

> *<Calculate_x(), Calculate_y(), Calculate_z()>*
> *ABX pigment function*
> These both parsed in 50 seconds.
>
> Functions as expected are much faster than macros, but no difference in
> parse times over 1 million iterations between three very simple functions
> and one complex function.

Have you considered conversion from 5D to 3D in your test ?
One complex function version has an adventage that it can be passed as one
parameter for manipulation macro. It can speed up macro call I think.

ABX


Post a reply to this message

From: Shay
Subject: Re: Pov race results.
Date: 4 Apr 2002 09:48:24
Message: <3cac67b8@news.povray.org>

news:k22oaucfog1al5e38660hg1s3h23jub2qf@4ax.com...
>
> 1 minute 30 sec or 1 hour 30 minutes ?
>

1 minute 30 seconds


>
> Have you considered conversion from 5D to 3D in your test ?
>

Removing conversion showed no measureable difference with 200,000
iterations. I did not test this at 1 million

> One complex function version has an adventage that it can be passed as one
> parameter for manipulation macro. It can speed up macro call I think.
>

I think that one complex function would have a speed advantage if it were
rearranged to fit a specific use. The individual functions which I used to
find x,y,&z contained operations which were common to each function. One
complex macro could perform the repetitive operations once while 3 simple
functions has to perform the operations for each vector.

 -Shay


Post a reply to this message

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