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 reportshows zerorustynes_apu::symbols at any percent limit, because fat LTO inlines the APU wholesale intocpu_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 boltand 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.mdwith its numbers, its order-bias control, and the mechanism behind the null result.
Verification
cargo test --workspace --features test-romsgreen — AccuracyCoin 141/141,visual_regression9/9, nestest 0-diff.- Workspace clippy clean at
-D warnings;cargo fmt --all --checkclean. shellcheckclean on every touched script.