View Single Post
Old 10-28-2006, 04:58 PM   #9 (permalink)
xir
Forum Newbie
 
Join Date: Jul 2004
Posts: 59
Default

I beleive switches are generally faster than chained if statements, especially if you have loads of them. To my knowledge switches are placed into a lookup table with an offset. After the comparison is done the program counter is set to the piece of code.

P.S. Found a reference
http://en.wikipedia.org/wiki/Jump_table
xir is offline   Reply With Quote