perf(sourcemap): use raw tokens during composition#10255
Draft
hyfdev wants to merge 3 commits into
Draft
Conversation
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label graphite: merge-when-ready to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
hyfdev
changed the base branch from
codex/issue-10070-root-fix
to
graphite-base/10255
July 13, 2026 07:50
hyfdev
force-pushed
the
graphite-base/10255
branch
from
July 13, 2026 07:50
204d8b1 to
2d55e36
Compare
hyfdev
force-pushed
the
codex/sourcemap-composition-raw-tokens
branch
from
July 13, 2026 07:50
9434116 to
1aa4c44
Compare
hyfdev
changed the base branch from
graphite-base/10255
to
codex/sourcemap-unmapped-boundaries
July 13, 2026 07:50
hyfdev
force-pushed
the
codex/sourcemap-unmapped-boundaries
branch
from
July 13, 2026 07:57
2d55e36 to
64b4cb3
Compare
hyfdev
force-pushed
the
codex/sourcemap-composition-raw-tokens
branch
2 times, most recently
from
July 13, 2026 09:49
1b99f9f to
e51699c
Compare
hyfdev
force-pushed
the
codex/sourcemap-unmapped-boundaries
branch
from
July 13, 2026 09:49
64b4cb3 to
f3b2bcb
Compare
hyfdev
force-pushed
the
codex/sourcemap-composition-raw-tokens
branch
from
July 15, 2026 05:55
e51699c to
61eba3b
Compare
hyfdev
force-pushed
the
codex/sourcemap-unmapped-boundaries
branch
from
July 15, 2026 05:55
f3b2bcb to
c81e977
Compare
hyfdev
force-pushed
the
codex/sourcemap-composition-raw-tokens
branch
from
July 15, 2026 06:31
61eba3b to
f5060d4
Compare
hyfdev
force-pushed
the
codex/sourcemap-unmapped-boundaries
branch
2 times, most recently
from
July 15, 2026 08:37
3600bc0 to
2e29bfc
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.

Why
The two PRs below this one establish the composition behavior for explicit unmapped boundaries and coarse same-line mappings. The hot loop only needs numeric token fields, but it still constructs source-view wrappers for every final and traced token.
This PR iterates raw
Tokens instead. It keeps strict lookup as the common path and reads the first token on the same line only when strict lookup misses. The behavior and output are unchanged; the tests added by the two lower PRs cover both exceptional paths.Benchmark
Command:
Environment: Apple M3 Pro, Darwin 25.5.0 arm64, rustc 1.97.0.
The repository's 52,004-token, three-map composition benchmark measured:
Both comparisons were statistically significant (
p = 0.00). These numbers describe this isolated benchmark, not an end-to-end build speedup.Validation
cargo test -p rolldown_sourcemapjust test-rustcargo clippy -p rolldown_sourcemap --all-targets -- --deny warnings