POV-Ray : Newsgroups : povray.advanced-users : collision detection : Re: collision detection Server Time
30 Jul 2024 00:31:25 EDT (-0400)
  Re: collision detection  
From: Chris Huff
Date: 22 Feb 2001 13:56:19
Message: <chrishuff-5E7B4E.13552522022001@news.povray.org>
In article <chrishuff-99F94F.13380822022001@news.povray.org>, Chris 
Huff <chr### [at] maccom> wrote:

> The macro version used 238 seconds, and the function version used 208 
> seconds, so the function version takes about 87% as long as the macro.

I decided to do a more accurate calculation by subtracting out the 
"overhead" of the rest of the scene (by replacing the call to the macro 
or function with a 0), and found out a surprisingly large portion of the 
time was spent in the loops themselves...and the function is a great 
deal faster than the macro.
The scene with no calls but the same number of repetitions used 204 
seconds, so the total time used by the function was 4 seconds and the 
total time used by the macro was 34 seconds. The function only takes 
about 11.7% as long as the macro...nearly 10 times faster.

Which figure is more relevant? The 11.7% is a better comparison of the 
speed of the macro with the speed of the function, but the 87% figure is 
closer to what you will see in real life...you will probably have the 
call nested in a bunch of loops and other macro calls. Only a small 
portion of the time was actually spent in the macro/function call.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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