Repository navigation
Use memchr for comment slash searches - #34
Open
charliermarsh wants to merge 1 commit into
Open
charliermarsh wants to merge 1 commit into
charliermarsh wants to merge 1 commit into
Conversation
This was referenced Oct 21, 2026
charliermarsh
added a commit
to astral-experiments/ohm
that referenced
this pull request
Oct 22, 2026
We prepare Ohm 1.99.0-8 with faster incremental formatting: verified module rewrites avoid whole-crate work, snapshot and parse state are reused, and comment scanning skips text without slashes. We pin [rustfmt #34](astral-experiments/ohm-rustfmt#34) and [Rust #200](astral-experiments/ohm-rust#200), which synchronizes the formatter’s new `memchr` dependency with the compiler workspace lockfile. Cargo, Clippy, and bundled upstream Wild keep their published pins. The optimizations guide is updated separately in #151 for review.
This was referenced Oct 30, 2026
charliermarsh
force-pushed
the
charlie/codex-fmt-memchr
branch
from
November 17, 2026 05:22
3c9620c to
5cd73db
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.
Use
memchrfor the slash checks introduced in #33. Text containing/still uses the existing comment lexer.Against #33, an edited uv
cargo fmt -p uvtook 0.86% less time across 80 accepted pairs on two devboxes (99% CI: 0.33–1.48%). Both hosts improved; 13 further pairs were excluded for host contention. The comparison used the same compiler, Cargo #176, and PGO inputs, and produced identical formatted output.This measures the patch on #33 before restacking; adding the dependency also relinked
cargo-fmt.