POV-Ray : Newsgroups : povray.general : Making faster #switch statements : Re: Making faster #switch statements Server Time
12 Aug 2024 09:24:42 EDT (-0400)
  Re: Making faster #switch statements  
From: Phoenix
Date: 5 Mar 1999 07:24:04
Message: <MPG.1149eb79f78933399896a1@news.povray.org>
'T was on Fri, 5 Mar 1999 12:59:14 +0100,
that Rudy Velthuis wrote:
> What makes you assume switch is slow in compiled code (C, Pascal, compiled
> Basic) at all?

This may have to do with the compiler I once wrote for a simple version 
of C. I had a hell of a time getting a working executable with a switch 
statement, let stand the horror of optimizing the code in such a fashion 
that would please my teacher...

In general, the time it takes to read in a jump table is far greater than 
just using the jump system that gets generated by an if-clause.

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.