-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Switch to byte processing (#219)
The grammar is fairly neutral, so long as we can handle "non-ASCII". This does introduce `unsafe` for cases where the grammar guarantees we'll have valid UTF-8, to avoid validation. There might be some more cases where we can bypass the checks; I was being cautious and only using `unsafe` for 7-bit ASCII. If we ensure our input is only UTF-8 and we only split on 7-bit ASCII, we are probably safe to use bypass validation everywhere. So this saves us having to encode UTF0-8 as `char` at the cost of some UTF-8 validation. Looks like this gives us a 6-12% reduction in parsing time.
- Loading branch information
Showing
17 changed files
with
495 additions
and
243 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
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
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
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
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
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
Oops, something went wrong.