PHASE_MANA_COST_PENDING_BORROW_LEGACY · branch loop/it22 · base 4ec0b9ef1 · candidate 2e852440c · took 1h 38m| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 21,547,784,064 | 21,545,538,001 | 4,000 | 5,386,665 | 2,896 | 2,833 |
| optimized | 21,529,517,301 | 21,528,877,500 | 4,000 | 5,382,299 | 2,294 | 2,261 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | -3.12% — cycles-faster (same-arm spread 1.54%) | faster |
| IPC (instructions per cycle, higher is better) | 1.038 / 1.002 | same |
| backend stall / frontend stall (share of cycles) | 18.0% / 16.5% · 42.0% / 45.2% | more waiting |
| L1D / L2D refills per 1k instructions (cache misses) | 13.00 / 13.00 · 10.92 / 11.39 | same |
| branch mispredicts per 1k instructions | 5.596 / 6.036 | fewer |
| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 77,464,272,797 | 77,448,457,048 | 11,418 | 6,783,707 | 19,111 | 12,618 |
| optimized | 77,365,570,082 | 77,391,055,687 | 11,418 | 6,776,871 | 19,274 | 12,150 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | +0.35% — cycles-neutral (same-arm spread 1.70%) | same within noise |
| IPC (instructions per cycle, higher is better) | 0.903 / 0.910 | same |
| backend stall / frontend stall (share of cycles) | 19.9% / 21.6% · 44.8% / 42.8% | less waiting |
| L1D / L2D refills per 1k instructions (cache misses) | 17.47 / 17.52 · 13.78 / 13.70 | same |
| branch mispredicts per 1k instructions | 5.116 / 5.006 | same |
Mechanism. mana_abilities.rs:3623 deep-clones PendingManaAbility for every cost component before pay_mana_ability_cost_component knows whether payment will suspend. Pass a borrowed-or-owned pending value: borrow during optimized synchronous payment and materialize ownership only when storing a continuation. Keep existing parent snapshots unchanged.
Evidence. xn5.67, docs/stage0-decision-memo.md:4904, measures continue_mana_ability_cost_payment_in_node at 16.7% inclusive CPU. Its referenced owners-all.txt attributes 3.6% CPU to an ability-tree clone owner, with 1.3% allocator ownership in owners-alloc.txt. PendingManaAbility contains an owned ability snapshot and continuation payloads. These overlapping profile rows bound relevant families; this particular clone has no isolated timer. This targets component-entry cloning, distinct from the rejected tap-parent construction experiment.
Counter and kill threshold. Existing xn5.67 mana-payment and ability-clone profile rows. Expected instruction reduction: 0.5–1.1% per action at 4,000 actions, an unmeasured planning estimate. Copy and allocation savings may register only in the marginal band; the exact removable share remains unknown.
Invariant. Synchronous component payment reads the pending activation without modifying it. A suspension must own exactly the same pending payload as today. Preserve selected-object cursors, deferred events, parent snapshots, source-loss fallback, journal nodes, errors and continuation ordering. Add permanent arm-to-arm regressions for synchronous composite payment and replacement suspension at different components, followed by identical resumption.
| Role | Harness / model | Time | Exit | Tokens in / out | Note |
|---|---|---|---|---|---|
| planner | codex / gpt-6.1-sol | 9m 59s | 0 | 3,687,562 / 10,976 | |
| executor | codex / gpt-6-luna | 39m 34s | 0 | 4,702,928 / 11,605 | |
| reviewer | codex / gpt-6.1-sol | 0m 24s | 0 | 20,458 / 526 | |
| executor | codex / gpt-6-luna | 25m 19s | 0 | 6,355,183 / 18,901 | |
| reviewer | codex / gpt-6.1-sol | 0m 32s | 0 | 22,327 / 664 |
| 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 it22-build |
| ir1k | pass | 0 | Ir -0.09% within +/-1%, same-arm spread 0.0366% | optimized 21,529,638,277 vs legacy 21,548,915,060 instructions; fingerprints match: True |
| ir4k | FAIL | 0 | Ir -0.11% within +/-1%, same-arm spread 0.0347% | optimized 77,373,617,461 vs legacy 77,456,543,256 instructions; fingerprints match: True |
Status: rejected (loop, instruction-count gate; wall-clock not yet confirmed)
Automated loop result on homelab (aarch64). Switch PHASE_MANA_COST_PENDING_BORROW_LEGACY, mechanism class copy. Mechanism: mana_abilities.rs:3623 deep-clones PendingManaAbility for every cost component before pay_mana_ability_cost_component knows whether payment will suspend. Pass a borrowed-or-owned pending value: borrow during optimized synchronous payment and materialize ownership only when storing a continuation. Keep existing parent snapshots unchanged. Invariant: Synchronous component payment reads the pending activation without modifying it. A suspension must own exactly the same pending payload as today. Preserve selected-object cursors, deferred events, parent snapshots, source-loss fallback, journal nodes, errors and continuation ordering. Add permanent arm-to-arm regressions for synchronous composite payment and replacement suspension at different components, followed by identical resumption.
| 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.09% within +/-1%, same-arm spread 0.0366% |
| ir4k | NO | Ir -0.11% within +/-1%, same-arm spread 0.0347% |
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:11 · read-only · refreshes every 30 s