POV-Ray : Newsgroups : povray.programming : Re: Problem with f_rounded_box function : Re: Problem with f_rounded_box function Server Time
1 Jun 2024 06:38:12 EDT (-0400)
  Re: Problem with f_rounded_box function  
From: Sebastian H 
Date: 15 Mar 2006 04:45:06
Message: <4417e222@news.povray.org>
Christoph Hormann wrote:
> 
> Well - the most important reason is to maintain the beauty of symmetry 
> in the code... ;-)

And the winning title is "A reflection of geometry in C"... :-)

I did some further investigation and compared four different
incarnations of f_rounded_box. The winner, at least on my pentium-m
machine, is version 5 (All versions are in the attachement).

For the comparison the (debian sarge) machine was switched into single
user mode and (hopefully) all unneccesary tasks were shut down. Then the
test scene (p.b.scene-files) were rendered 8 times each with no
jitter/AA at 8000x4500.
A plot of the render times is in p.b.images.

Astonishing is that version 5 is faster than version 8
although the latter one contains a simpler square root function.
Probably some compiler optimization (g++ (GCC) 3.3.5 (Debian 
1:3.3.5-13)) jumped in in version 5.

Regards,
Sebastian

P.S.: The second attachement contains the render times for the test
scene.


Post a reply to this message


Attachments:
Download 'us-ascii' (3 KB) Download 'times.dat.txt' (1 KB)

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