PHASE_LAYER_RESET_BUFFERS_LEGACY · branch loop/it44 · base 4ec0b9ef1 · candidate acbdf7fd1 · took 1h 0m| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 22,104,595,082 | 22,105,382,738 | 4,000 | 5,526,247 | 2,548 | 2,712 |
| optimized | 22,090,862,637 | 22,094,744,071 | 4,000 | 5,523,201 | 2,742 | 2,739 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | +0.67% — cycles-neutral (same-arm spread 5.52%) | same within noise |
| IPC (instructions per cycle, higher is better) | 1.011 / 0.996 | same |
| backend stall / frontend stall (share of cycles) | 16.3% / 17.3% · 44.7% / 43.6% | less waiting |
| L1D / L2D refills per 1k instructions (cache misses) | 12.69 / 12.73 · 11.04 / 11.19 | same |
| branch mispredicts per 1k instructions | 5.985 / 5.930 | same |
| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 81,058,653,465 | 81,066,857,742 | 11,418 | 7,099,558 | 18,891 | 12,465 |
| optimized | 80,947,255,849 | 80,930,399,413 | 11,418 | 7,088,704 | 20,407 | 13,064 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | -1.10% — cycles-neutral (same-arm spread 5.27%) | same within noise |
| IPC (instructions per cycle, higher is better) | 0.889 / 0.894 | same |
| backend stall / frontend stall (share of cycles) | 21.2% / 20.9% · 43.9% / 44.0% | same |
| L1D / L2D refills per 1k instructions (cache misses) | 16.79 / 16.79 · 13.44 / 13.40 | same |
| branch mispredicts per 1k instructions | 5.206 / 5.264 | same |
Mechanism. At layers.rs:2611, seed_live_characteristics_from_base replaces owned strings and vectors with newly allocated clones on every reset. Reuse destination capacity with String::clone_from and Vec::clone_from for name, card-type components, keywords and colors. For ManaCost::Cost-to-Cost resets, reuse the shards vector and assign generic; preserve clone assignment for other variant combinations. Keep every reset and subsequent layer application.
Evidence. xn5.67, docs/stage0-decision-memo.md:L4904, attributes 0.89% of sampled CPU to reset_recipient_to_base. Its allocation-owner report, bench/reports/uprof-xn565-20260923-owners-alloc.txt, also places 1.1% of allocation/copy samples under evaluate_layers; these figures overlap and must not be added. Source inspection confirms allocation-producing assignments in the reset. The profile predates later loop changes, so it supplies a historical ceiling, not current savings.
Counter and kill threshold. Existing profile row: reset_recipient_to_base, 0.89% inclusive CPU in xn5.67. Expected 4,000-action instruction reduction: 0.3–0.6% per action, an unmeasured forecast likely to enter the marginal band. Allocation savings may produce a larger wall-clock improvement. The loop's normal instruction and fingerprint gates decide.
Invariant. Reset values, vector order, keyword multiplicity, mana-cost variants and base characteristics remain identical; only destination capacity changes. Base storage and sibling forks remain independent.
| Role | Harness / model | Time | Exit | Tokens in / out | Note |
|---|---|---|---|---|---|
| planner | codex / gpt-6.1-sol | 7m 39s | 0 | 2,289,553 / 9,263 | |
| executor | codex / gpt-6-luna | 29m 28s | 0 | 6,549,424 / 14,237 | |
| reviewer | codex / gpt-6.1-sol | 0m 41s | 0 | 21,488 / 836 |
| Gate | Result | Exit | Detail |
|---|---|---|---|
| fmt | pass | 0 | cargo fmt --all -- --check |
| build | pass | 0 | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode build -CargoProfile bench-fast-inc -Label it44-build |
| ir1k | pass | 0 | Ir -0.05% within +/-1%, same-arm spread 0.0211% | optimized 22,093,706,957 vs legacy 22,104,198,730 instructions; fingerprints match: True |
| ir4k | FAIL | 0 | Ir -0.15% within +/-1%, same-arm spread 0.0208% | optimized 80,941,217,884 vs legacy 81,066,142,787 instructions; fingerprints match: True |
Status: rejected (loop, instruction-count gate; wall-clock not yet confirmed)
Automated loop result on homelab (aarch64). Switch PHASE_LAYER_RESET_BUFFERS_LEGACY, mechanism class allocation. Mechanism: At layers.rs:2611, seed_live_characteristics_from_base replaces owned strings and vectors with newly allocated clones on every reset. Reuse destination capacity with String::clone_from and Vec::clone_from for name, card-type components, keywords and colors. For ManaCost::Cost-to-Cost resets, reuse the shards vector and assign generic; preserve clone assignment for other variant combinations. Keep every reset and subsequent layer application. Invariant: Reset values, vector order, keyword multiplicity, mana-cost variants and base characteristics remain identical; only destination capacity changes. Base storage and sibling forks remain independent.
| gate | passed | detail |
|---|---|---|
| fmt | yes | cargo fmt --all -- --check |
| build | yes | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode build -CargoProfile bench-fa |
| ir1k | yes | Ir -0.05% within +/-1%, same-arm spread 0.0211% |
| ir4k | NO | Ir -0.15% within +/-1%, same-arm spread 0.0208% |
Wall-clock confirmation on the workstation is required before this counts as a speedup; instruction count is a screen, not a time prediction.
generated 2026-11-28 18:17:10 · read-only · refreshes every 30 s