Lambda vs. function
mjs at apple.com
Tue Oct 28 12:54:53 PDT 2008
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.
More information about the Es-discuss