PHASE_MANA_TAP_PARENT_LEGACY · branch loop/it21 · base 4ec0b9ef1 · candidate a0816492a · took 58m 41s| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 21,781,942,009 | 21,780,843,976 | 4,000 | 5,445,348 | 2,372 | 2,257 |
| optimized | 21,757,956,989 | 21,755,603,991 | 4,000 | 5,439,195 | 2,559 | 2,481 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | -0.10% — cycles-neutral (same-arm spread 5.76%) | same within noise |
| IPC (instructions per cycle, higher is better) | 1.004 / 1.025 | same |
| backend stall / frontend stall (share of cycles) | 19.0% / 20.0% · 41.8% / 40.1% | same |
| L1D / L2D refills per 1k instructions (cache misses) | 12.85 / 12.88 · 11.13 / 10.98 | same |
| branch mispredicts per 1k instructions | 5.596 / 5.402 | same |
| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 78,427,673,740 | 78,444,630,381 | 11,418 | 6,869,518 | 19,862 | 13,015 |
| optimized | 78,301,395,666 | 78,321,805,709 | 11,418 | 6,858,609 | 17,235 | 11,254 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | +1.39% — cycles-neutral (same-arm spread 8.66%) | same within noise |
| IPC (instructions per cycle, higher is better) | 0.924 / 0.913 | same |
| backend stall / frontend stall (share of cycles) | 26.8% / 25.2% · 36.8% / 38.8% | more waiting |
| L1D / L2D refills per 1k instructions (cache misses) | 17.30 / 17.34 · 13.70 / 13.62 | same |
| branch mispredicts per 1k instructions | 5.293 / 5.179 | same |
Mechanism. In mana_abilities.rs::pay_mana_ability_cost_component, the fallback branch clones the cursor and pending ability and allocates two boxes to construct ManaAbilityCostParent. For an AbilityCost::Tap leaf, pay_mana_ability_cost_with_choices only calls tap_source and never reads that parent. Omit parent construction for precisely this leaf and pass None; preserve construction for every other cost.
Evidence. docs/stage0-decision-memo.md:L4904, xn5.67, measures continue_mana_ability_cost_payment_in_node at 16.7% inclusive CPU. Its recorded owners-all artifact attributes 3.6% CPU to ability::impl$1662::clone, and owners-alloc attributes 1.3% to allocation under that clone owner. These are overlapping family ceilings, not a measured removable slice. Source inspection identifies unconditional continuation construction on the tap path. This differs from xn5.36's deferred outer auto-tap setup cut.
Counter and kill threshold. Existing xn5.67 mana-payment inclusive row and clone allocation-owner rows bound the family; this construction has no isolated timer. Expected instruction reduction: 0.5–1.2% per action at 4,000 actions, an unmeasured estimate. Allocation savings may register only in the marginal band.
Invariant. The Tap arm does not consume the parent argument. Removing its unused snapshot must preserve cost payment, errors, event order, replacement pauses, unpaid suffixes, journal records and all three fingerprints. Every non-Tap cost retains its existing parent ownership.
| Role | Harness / model | Time | Exit | Tokens in / out | Note |
|---|---|---|---|---|---|
| planner | codex / gpt-6.1-sol | 8m 52s | 0 | 2,192,035 / 10,049 | |
| executor | codex / gpt-6-luna | 35m 49s | 0 | 6,367,348 / 16,707 | |
| reviewer | codex / gpt-6.1-sol | 0m 30s | 0 | 23,222 / 650 |
| 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 it21-build |
| ir1k | pass | 0 | Ir -0.12% within +/-1%, same-arm spread 0.0252% | optimized 21,756,131,454 vs legacy 21,783,039,645 instructions; fingerprints match: True |
| ir4k | FAIL | 0 | Ir -0.16% within +/-1%, same-arm spread 0.0265% | optimized 78,308,083,887 vs legacy 78,432,149,678 instructions; fingerprints match: True |
Status: rejected (loop, instruction-count gate; wall-clock not yet confirmed)
Automated loop result on homelab (aarch64). Switch PHASE_MANA_TAP_PARENT_LEGACY, mechanism class allocation. Mechanism: In mana_abilities.rs::pay_mana_ability_cost_component, the fallback branch clones the cursor and pending ability and allocates two boxes to construct ManaAbilityCostParent. For an AbilityCost::Tap leaf, pay_mana_ability_cost_with_choices only calls tap_source and never reads that parent. Omit parent construction for precisely this leaf and pass None; preserve construction for every other cost. Invariant: The Tap arm does not consume the parent argument. Removing its unused snapshot must preserve cost payment, errors, event order, replacement pauses, unpaid suffixes, journal records and all three fingerprints. Every non-Tap cost retains its existing parent ownership.
| 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.12% within +/-1%, same-arm spread 0.0252% |
| ir4k | NO | Ir -0.16% within +/-1%, same-arm spread 0.0265% |
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:14 · read-only · refreshes every 30 s