Factor duplicate code out of parsers#976
Merged
Martin1887 merged 3 commits intopulldown-cmark:masterfrom Oct 29, 2024
Merged
Conversation
This reduces the number of bounds checks, bringing instruction count down from about 1600 to 1400.
This reduces the number of bounds checks, reducing the number of lines of assembly from about 1100 to 900.
5a13ac8 to
f2aa1e8
Compare
This reduces duplicate code, bringing parse_block down from 9073 to 8617, ignoring parse_footnote_definition, which didn't used to be inlined but now is.
f2aa1e8 to
20d63b7
Compare
Collaborator
|
Thanks! |
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.
This PR has miscellaneous refactoring, to reduce duplicate source code and generated code size:
skip_container_prefixesandscan_next_line_or_lazy_continuation, to reduce code duplication.Optionsitself down instead ofbool, to prevent some potentially very easy mixups.cargo-show-asm) that the compiler couldn't see it.