Re: switch bug?

new topic     » goto parent     » topic index » view thread      » older message » newer message
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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu