glayzzle / glayzzle/php-parser
improve parsing speed
Open
enhancement
LEXER
PARSER
- Dominant language
- JavaScript
- Stars
- 565
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
The lexer speed (reading a string from memory) is about 2,5 millions tokens / sec (depends on CPU).
It's about 3 times more slower than original PHP algorithm, but about 16 times more rapid than a jison based version (which is also more rapid than a regex version ...)
The lexer algorithm could be improved a bit, but there will not be much gain here.
The parser sometimes is 10x slower than the lexer, there is a lot of room to improve the speed, the most cost effective part is recursive parsing on structures like arrays, property chains or string concatenations.
Contributor guide
Assessment
This issue has not been assessed yet.