extract optimized parser from binary string into separate module#9
Merged
romsahel merged 1 commit intoparsers/rfc_2822/line-by-line-parsing-from-streamfrom Mar 3, 2026
Conversation
b496165 to
1322470
Compare
1896cd2 to
c615d24
Compare
1322470 to
de640f2
Compare
See this PR for details DockYard#204
c615d24 to
e4e901d
Compare
de640f2 to
73708e3
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See this PR for details: DockYard#204
Except this time I moved the refactor/optimization into its own module since the original repo does not seem to want to merge this change.
With this module side-by-side with the original, we can remain in sync and benefit from fixes made to the parser and renderer.
Here is a benchmark of this version:
Seeing some more benchmark, I think there is still room for improvement though - especially with some of the string operations. From the fprof profile (on a 1.84M-line test email):