Comment #6 on issue 2275 by [email protected]: Disappointingly bad switch performance on V8
http://code.google.com/p/v8/issues/detail?id=2275

At some point we should definitely have another look at our handling of switch statements, but this is currently not high on our priority list.

If you have a dense switch statement, dispatching via an array is the best way to do it, anyway, and normally this can easily be done on the source language level if your compiler can't do this for you. This is very much like using a computed goto in C/C++ when implementing a bytecode interpreter. Furthermore, by using a huge function, you can easily run into several compilation limits, which is yet another reason to split things up.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to