-
-
Notifications
You must be signed in to change notification settings - Fork 1
release: v2.3.1 "Plumb Line" — measurement apparatus, and ten measured rejections #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f468e76
perf(tooling): add a harness-free frame-cost probe (v2.3.1 "Plumb Line")
doublegate 52cedcb
perf(ci): make the relative frame-time gate refuse a verdict on a con…
doublegate 32fc007
perf(tooling): per-subsystem frame breakdown — the symbol profile hid…
doublegate a941eef
docs(plan): v2.3.1 "Plumb Line" plan — measurement-first release record
doublegate d937c0b
docs(plan): re-rank the v2.3.2 "Grain" items against the measured split
doublegate 69fb651
perf(ppu): re-measure the idle-line fast path — REJECTED again, stays…
doublegate e12a431
perf(tooling): add ab_check.sh — adjudicate one optimization at the >…
doublegate 9451e68
perf(ppu): reject the field-layout item — and fix the harness bug it …
doublegate f7ad5af
ci(pgo): probe for llvm-bolt by locating the binary, not by trusting apt
doublegate 05b8732
perf(ppu): reject the dead-per-dot-derivation sink — LLVM already doe…
doublegate 84605a6
perf(ppu): reject items 8, 6 and 2 — all three have a ceiling of zero
doublegate 7c3956c
perf: reject the final four Grain items — ten measured, ten rejected
doublegate f1d86ef
docs: fold the core hot-path campaign into v2.3.1; Grain becomes the …
doublegate 20df2f7
docs(changelog): record v2.3.1 "Plumb Line" under [Unreleased]
doublegate 20fb34d
ci(pgo): disable the BOLT gate — it reported a fabricated speedup
doublegate 9a74cab
release: cut v2.3.1 "Plumb Line" + address PR #348 review
doublegate d9c561c
ci(pgo): separate BOLT discovery from host mutation; document frame_p…
doublegate 3fbc11d
docs/perf: scope the "nothing left" claim to the ten measured candidates
doublegate 59c8b60
ci/perf: upload the actual BOLT binary; reject malformed probe arguments
doublegate 88850cd
fix(bench): reject a bare "." as a numeric override
doublegate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| RustyNES **v2.3.1 "Plumb Line"** is a measurement release. It makes the | ||
| performance apparatus trustworthy and then uses it — and what it found is that | ||
| **none of the ten hot-path candidates it measured yielded a shippable | ||
| improvement.** That is a claim about those ten, not about the core as a whole: | ||
| two core leads the campaign surfaced (the APU at 18.7% of frame, and `range.rs` | ||
| inlined inside `Ppu::tick` at 1.52%) remain **unmeasured** and are carried | ||
| forward. | ||
|
|
||
| **No emulation-core changes.** AccuracyCoin holds at **exactly 141/141** and | ||
| nestest is 0-diff, verified after every experimental probe was reverted rather | ||
| than merely asserted by construction: this release did land and remove real | ||
| edits. | ||
|
|
||
| ## Why a measurement release | ||
|
|
||
| Two failures in the preceding release motivated it. | ||
|
|
||
| - **v2.3.0's adopted PPU optimization measured `+2%` on a contended host and | ||
| `−5.13%` re-measured quiet** — the same commit, opposite sign. The project's | ||
| adopt/reject bar is only as good as the host it runs on, and nothing noticed | ||
| the host. | ||
| - **The profile the campaign was scoped from does not contain the APU.** | ||
| `perf report` shows zero `rustynes_apu::` symbols at any percent limit, because | ||
| fat LTO inlines the APU wholesale into `cpu_clock`. The working split | ||
| "PPU ~53%, CPU+bus ~39%" had folded roughly a fifth of the frame into the wrong | ||
| bucket. | ||
|
|
||
| ## New measurement tooling | ||
|
|
||
| | tool | what it revealed | | ||
| | --- | --- | | ||
| | `frame_probe` — harness-free frame cost | criterion's own rayon / `exp` / sort work was **~17% of every profile** | | ||
| | `frame_breakdown.sh` — attribution by source file | the **APU is 18.7% of frame time**; `perf report --inline` does *not* recover it | | ||
| | `ab_check.sh` — adoption A/B with an A/B/A order-bias control | the reference drifts up to **−1.17% from run position alone** | | ||
|
|
||
| Corrected subsystem split: **PPU 52.1% · APU 18.7% · CPU 10.1% · bus/scheduler | ||
| coupling 9.9% · std inlined at call sites 6.7% · mappers 2.5%.** The CPU proper | ||
| is about a third of what the symbol profile implied. | ||
|
|
||
| `bench_relative_check.sh` additionally declines to emit a verdict when the host | ||
| was too noisy to resolve the effect under test, keyed on a robust MAD-based | ||
| coefficient of variation. | ||
|
|
||
| ## Ten candidates measured, ten rejected | ||
|
|
||
| | mechanism | items | | ||
| | --- | --- | | ||
| | LLVM already performs the transformation | sink dead per-dot derivations | | ||
| | the premise is factually false | `repr(Rust)` ignores source order; the named functions were already inlined | | ||
| | real work, absorbed off the critical path | the `index_framebuffer` store; the open-bus decay loop; the ALE/read recompute | | ||
| | the elision is real but buys nothing | typed-index bounds elision | | ||
| | the target is too small to matter | the `bg_split_state` capability gate (0.09% of frame) | | ||
| | forbidden by the ownership model | hoisting `PpuBusAdapter` (borrow checker, with no `unsafe` permitted) | | ||
|
|
||
| Six distinct mechanisms, which is what makes this a finding rather than one bad | ||
| assumption repeated: **the per-dot loop has no incidental overhead left to | ||
| reclaim.** Its ~3.78 ms is work the accuracy model requires. That corroborates | ||
| the existing record, where bounds-check elision and a SIMD blitter both measured | ||
| *slower*. | ||
|
|
||
| ## Two near-misses | ||
|
|
||
| Worth recording, because each would have shipped on a single reading: | ||
|
|
||
| - One candidate produced a textbook **−1.84% … −2.75% at p = 0.00 on all four | ||
| workloads** — entirely an order-bias artifact. It measured as exactly zero on | ||
| re-run. This is what prompted the A/B/A control. | ||
| - Another measured **−0.51% at p = 0.00 on a shipped configuration** with a clean | ||
| control, then **+0.01% (p = 0.96)** on re-run. | ||
|
|
||
| Both were caught only by requiring an independent second run. | ||
|
|
||
| ## Also in this release | ||
|
|
||
| - The PGO workflow's BOLT probe no longer reports success without BOLT. It ran | ||
| `apt-get install bolt` and trusted the exit status — but on Ubuntu that package | ||
| is the **Thunderbolt 3 device manager**, so the stage failed on the tool it had | ||
| just "confirmed" instead of skipping as its best-effort contract intends. | ||
| - Every rejected experiment is recorded in `docs/performance.md` with its | ||
| numbers, its order-bias control, and the mechanism behind the null result. | ||
|
|
||
| ## Verification | ||
|
|
||
| - `cargo test --workspace --features test-roms` green — AccuracyCoin **141/141**, | ||
| `visual_regression` 9/9, nestest 0-diff. | ||
| - Workspace clippy clean at `-D warnings`; `cargo fmt --all --check` clean. | ||
| - `shellcheck` clean on every touched script. |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.