glayzzle / glayzzle/php-parser

improve parsing speed

Open
#57 2 comments 0 reactions 1 assignee Claimed by @ichiriac View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.