Re: switch bug?
- Posted by mattlewis (admin) Jul 22, 2008
- 848 views
said...
So, in the second case we really did not gain much speed, but in the first.... Wow! Thanks Matt!
Yes, the second case still uses the same code (i.e., find()). Basically, if all of your cases are integers, it will be faster. And if the difference between the max and min case is 1024 or less, it will be a lot faster.
Matt