POV-Ray : Newsgroups : povray.general : Algorithm issues: what is better? : Re: Algorithm issues: what is better? Server Time
5 Nov 2024 13:23:20 EST (-0500)
  Re: Algorithm issues: what is better?  
From: Slime
Date: 24 Mar 2003 16:41:31
Message: <3e7f7b8b$1@news.povray.org>
> Is it better to apply mod() in every step, or use an #if in every
> step in order to know if mod() should be applied? What is less
> costly parsing-wise?

It probably depends on the complexity of the if() condition, the complexity
of the mod()-related function, and and probability of the if() condition
being true.

if the if() condition is less complex than the mod()-related function, and
the probability of the if() condition being true is low, then use the if().

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

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