-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve lexer by make cursor iterate over bytes #915
Conversation
Codecov Report
@@ Coverage Diff @@
## master #915 +/- ##
==========================================
+ Coverage 59.21% 59.29% +0.07%
==========================================
Files 166 166
Lines 10570 10689 +119
==========================================
+ Hits 6259 6338 +79
- Misses 4311 4351 +40
Continue to review full report at Codecov.
|
This PR is ready for review now. Unfortunately, it is hard to tell that this idea, i.e. iterating over bytes instead of chars, and the implementation improves the performance from the existing benchmarks. However, it is still good to have it since we can now skip/handle/report the position of invalid char with the new lexer instead of panic when reading the input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this - looks good :)
This looks great to me, great work @jevancc |
Benchmark results are looking good. No big speed up, but no regressions. Test results look good too:
No conformance changes, so I'm happy with this, it opens new doors. Thanks for your work! |
This Pull Request fixes/closes #335 . Notice that this PR does not change any behavior of the existing lexer.
It changes the following:
Not covered in this PR: