Skip to content

Skip comment scans for text without slashes - #33

Open
charliermarsh wants to merge 1 commit into
charlie/codex-uv-fmt-overheadfrom
charlie/codex-fmt-comment-scan
Open

charliermarsh wants to merge 1 commit into
charlie/codex-uv-fmt-overheadfrom
charlie/codex-fmt-comment-scan

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Skip comment lexing when text contains no /, both when finding comments and when checking that formatting preserved their content. Text containing / still uses the existing lexer.

Against #27, an edited uv cargo fmt -p uv took 14.9% less time across 40 accepted pairs (99% CI: 13.3–16.1%); median time fell from 1.537 s to 1.304 s. Two further pairs were excluded for host contention. Both builds used the same compiler, Cargo #176, and PGO inputs, and produced identical formatted output.

@charliermarsh
charliermarsh force-pushed the charlie/codex-fmt-comment-scan branch from ff92f3f to cc21335 Compare November 17, 2026 05:22
@charliermarsh
charliermarsh removed this pull request from stack #82 November 17, 2026 05:26
@charliermarsh
charliermarsh added this pull request to stack #84 November 17, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant