Wait, the second fastest is the Javascript one?
Back when I was playing with parsers in JS, the fastest approach to anything string-related was through RegExp, even trivial tasks like "first character is X".
The caveat, of course, was that you would only get that performance under v8.
Nowadays it should be more balanced, but I have no idea how v8 compares to SM anymore.