Re: switch bug?
euphoric said...
Is if...elsif...endif just as fast as the switch statement?
Matt just released the first round of optimizations for switch. These optimizations are in the interpreter. The translator is still hit and miss in relation to speed vs. if, but it's coming too.
here are the new results. Remember in the previous test that if was faster in the first test and switch was faster in the second.
C:\Develop\euphoria>exwc bench-switch.ex switch=0.749000 if=2.636000 C:\Develop\euphoria>exwc bench-switch2.ex switch=3.400000 if=4.540000
So, in the second case we really did not gain much speed, but in the first.... Wow! Thanks Matt!
Jeremy