POV-Ray : Newsgroups : povray.general : Making faster #switch statements : Re: Making faster #switch statements Server Time
12 Aug 2024 09:25:11 EDT (-0400)
  Re: Making faster #switch statements  
From: Phoenix
Date: 5 Mar 1999 05:26:58
Message: <MPG.1149d0093256ed4f9896a0@news.povray.org>
'T was on Fri, 5 Mar 1999 00:25:10 +0100,
that Martin Magnusson wrote:
> but it seems like that *increased* the parse time by about 50%. I thought
> that just picking a precomputed value would be faster than calculating
> Pythagoras' theorem. Did I do something wrong, or is #switch really that
> slow?

The switch statement is already slow in compiled code (C, that is). It's 
total horror when used in an interpreted language like POV's. Use #if if 
you can.

Phoenix

-- 
eag### [at] telekabelnl                       http://users.telekabel.nl/eagle
------------------------------------------------------------------------
The POV-Ray VFAQ: http://iki.fi/warp/povVFAQ.html


Post a reply to this message

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