Re:If-else vs switch – Which is better?
by haberman on Monday August 03, 2009 @03:49AM
(#738800)
> Some others have also hinted at using an array of function pointers and indexing by switch variable.
Doing this explicitly makes no sense -- I'm pretty sure the compiler will compile the switch this way if its heuristics determine that it the fastest way.
Doing this explicitly makes no sense -- I'm pretty sure the compiler will compile the switch this way if its heuristics determine that it the fastest way.