POV-Ray : Newsgroups : povray.advanced-users : collision detection : Re: collision detection Server Time
30 Jul 2024 00:19:52 EDT (-0400)
  Re: collision detection  
From: Chris Huff
Date: 22 Feb 2001 13:39:03
Message: <chrishuff-99F94F.13380822022001@news.povray.org>
In article <3A9550F9.80FAA811@gmx.de>, Christoph Hormann 
<chr### [at] gmxde> wrote:

> The hardcoded version would probably be much faster so i think it's quite
> a good idea when it should be used for collision detection where it would
> be called quite often.  

The patch I posted compiled and ran fine.
I tested the speed with a file that called the function or macro 64^3 
(262144) times.
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.

It seems macros don't have that much overhead...at least, the MegaPOV 
macros, which have been optimized. However, in a collision detection 
algorithm, which could easily use even more calls, this small 
improvement would still be helpful.

-- 
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.