POV-Ray : Newsgroups : povray.general : Efficiency of parsing... : Efficiency of parsing... Server Time
4 Aug 2024 16:13:25 EDT (-0400)
  Efficiency of parsing...  
From: Tim Nikias v2 0
Date: 31 Mar 2003 07:04:58
Message: <3e882eea$1@news.povray.org>
In my Water-Surface-Simulation WIP I have to make
extensive use of array-look-ups and #if statements,
so I'm trying to use the most efficient way for POV
to parse (even though it might be only like 1 or 2 internal
calculations for POV, this adds up quickly with several
thousands of calculations...).

I've already made use that array-look-up is less efficient
than using a "plain" variable, and I've made use of that
where it would have some significant impact (speak:
whenever I look at the same array-entry for more than
three times).

I'm wondering about the boolean parsing. Is it easier
for POV to do
(A!=1) (is A not equal to 1?) or
(A-1) (is A minus 1 true?).

I'm assuming that (A-1) would be better, but I'm not sure
about that. After all, it just has to subtract 1 and see
if value is still true, whereas with A!=1 it would have to
somehow check if A is 1, and if so, return false.

Anybody have some insight into this?

--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde


Post a reply to this message

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