22.11.2009, 20:02
Actually "switch" doesn't jump right into right case because it CAN NOT !
Speed is gained by generating only ONE(1) result and then comparing them to CASES, and "if" generate ONE(1) result per EVERY IF and then compare EACH so it's PURE LOGIC that switch is faster in that way.
Speed is gained by generating only ONE(1) result and then comparing them to CASES, and "if" generate ONE(1) result per EVERY IF and then compare EACH so it's PURE LOGIC that switch is faster in that way.