Skip to content

[Check instructions -0.028%; isolated pre-PGO screen] Decode cache footer tables directly and borrow carried maps - #149

Draft
xmakro wants to merge 1 commit into
perf-review-20260907/35-metavar-span-pairsfrom
perf-review-20260907/36-footer-copies
Draft

[Check instructions -0.028%; isolated pre-PGO screen] Decode cache footer tables directly and borrow carried maps#149
xmakro wants to merge 1 commit into
perf-review-20260907/35-metavar-span-pairsfrom
perf-review-20260907/36-footer-copies

Conversation

@xmakro

@xmakro xmakro commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Decode lookup tables directly into maps and encode carried syntax-context data by reference. Generic footer representations preserve the wire bytes; a unit test checks owned/borrowed byte equality and duplicate-key decoding.

Measurement: stack-v30b versus stack-v27.

Scenario Instruction change Cells
All scenarios -0.028% 83
Full +0.000% 20
Incremental full +0.000% 20
Incremental unchanged -0.062% 20
Incremental patched -0.049% 23

Instruction counts improve in 54/83 cells. All cells have two observations with instruction spread at most 0.5%. Negative changes mean less work.

The historical screen uses the stock rustc-perf collector, all 20 Primary benchmarks and 83 Check/scenario cells, with native hardware counters. These early source screens predate Rust PGO; large sequential wall-time/RSS differences were not attributed to these patches. Scenarios and benchmark patches, incremental hash verification and one frontend thread are preserved. Results are equal-cell geometric means; two repetitions give a quick estimate, not a full CI campaign.

Personal review series, change 36/45. Both base and head are in this fork. The base is the preceding review branch so the Files changed view contains only this change.

The complete retained v102 stack was separately rebuilt and independently PGO-trained, then measured in a fresh paired 249-cell Check/Debug/Opt run: instructions -10.227%, wall time -7.611%, peak RSS -1.601%. The local configuration reuses CI LLVM and fixed standard libraries; it omits LLVM retraining, BOLT and the self-profile measurement pass. This combined result is not an individual PR contribution.

Validation of retained checkpoints and the final compiler includes 21,944 UI, 180 incremental, 409 MIR and 1,067 LLVM codegen tests, plus relevant unit tests and repeated incremental stress. Splitting commits changes no compiler source: the final Git tree matches the tested input exactly. Intermediate review branches have not each been rebuilt. Commit messages skip automatic CI for this reading-only series.

Local evidence: stack-v30b-contribution-check.json and its adjacent per-cell CSV in the September 6 investigation directory. Final evidence: stage2-stack102-trained-paired-all-full.json and retained-v102-checkpoint.json.

@xmakro xmakro changed the title [0.028% fewer Check instructions] Decode cache footer tables directly and borrow carried maps [Check instructions -0.028%; isolated pre-PGO screen] Decode cache footer tables directly and borrow carried maps Sep 8, 2026
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