Repository navigation
Conversation
Inlining this shared helper duplicates mark-filtering and attachment class checks across generic matching loops. Keep one out-of-line body while leaving the non-mark fast path inline. In the measured release/LTO build this saves about 12.5 KiB of ELF text+data (12 KiB in stripped CLI and C API library file sizes). The Nastaliq sample is unchanged; Amiri samples slow by up to about 2.4%. Workspace all-feature tests, including 6073 shaping cases, strict Clippy, formatting, and Rust 1.85 no-std ARM build pass. Assisted-by: OpenAI Codex
Member
Author
|
Too dependent on codegen compiler decisions. |
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.
Stacked on #502, which is stacked on the extended-layout work in #495.
This PR contains only the two-line mark-check change.
Keep
match_properties_markout of line so its filtering-set and attachment-classchecks are shared across the generic matching loops. The common non-mark path
stays inline; matching behavior is unchanged.
Size and performance
Measured on Linux x86-64 with Rust 1.89, release optimization, fat LTO, and one
codegen unit, against the base including #502:
hr-shapeand the C API library.the other measured samples are roughly within ±1%. This is a deliberate size
tradeoff, not a claim of universal performance neutrality.
Timing checks used CPU-pinned alternating before/after runs across six short
samples, Arabic text with diacritics, the existing Arabic/Indic/Latin benchmark
corpora, and a variable Source Serif sample. Glyphs, positions, and flags match
the baseline in all four directions for those inputs.
Forcing all apply methods or generic matching functions out of line grew the
binary; outlining the shared mutation/application helpers barely helped. Only
the mark-specific helper is kept here.
Validation
thumbv7em-none-eabihfwithlibm.