On Oct 28, 2008, at 12:46 PM, Peter Michaux wrote:

I do roughly the same thing. Using an object is faster than "switch"
also, as far as I recall doing some tests. The speed of switch seems
to be the same speed as if-else if-else if-...-else.

It really depends on what you are doing. At least some modern implementations use a jump table for common cases such as all simple integer values in the case blocks.

Regards,
Maciej

_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to