mozilla/shumway — pull request #1586 by nnethercote (2014-08-21 07:55:24+00:00)
Title: Use static String.charCodeAt() to avoid allocations.

If you call charCodeAt() on a normal string it causes a String object to
be created. The first such call in isIndex() accounts for more than 10%
of all the JS engine allocations done after running the racing game for
a short time.

This patch switches to the static version of charCodeAt() that doesn't
require creating an object. And although my profile shows that only the
first call in isIndex() is hot, I changed the other calls in the same
file just in case.