stephens2424/php — pull request #8 by DisposaBoy (2014-10-22 12:43:30+00:00)
Title: Speedup lexing

Speedup lexing by only converting the maximum required runes, once and looking directly in the TokenMap.

There are more invasive ways to speed this up, but this was the minimal change I could think. e.g. A trie would be a lot faster but that would require a lot of changes.

On a simple test I saw times like `before: ~200ms, after: ~45ms` which is almost fast enough for my liking. To put it into a more realistic context: I usually run with CPU scaling on so those times balloon up to `before: ~800ms, after: ~200ms` and that's only on one file