This repository has been archived by the owner on Sep 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New lexing algorithm: “offset” instead of “anchor”.
Now, the lexer keeps the text untouched, in the same buffer/string, and uses the `$offset` argument of `preg_match`. It avoids some `mb_*` calls, creation of substrings for each consumed tokens, etc. The lexer is 1.38 times faster and requires 1.27 times less memory
- Loading branch information
Showing
1 changed file
with
27 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters