PHASE_LAYER_IDENTITY_RECIPIENT_LEGACY · branch loop/it37 · base 4ec0b9ef1 · candidate 58c3e99a3 · took 1h 49m| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 22,103,273,977 | 22,104,275,018 | 4,000 | 5,525,944 | 2,504 | 2,406 |
| optimized | 22,099,704,524 | 22,101,446,782 | 4,000 | 5,525,144 | 4,194 | 4,503 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | +0.23% — cycles-neutral (same-arm spread 6.89%) | same within noise |
| IPC (instructions per cycle, higher is better) | 1.008 / 1.024 | same |
| backend stall / frontend stall (share of cycles) | 18.2% / 19.2% · 43.2% / 41.5% | same |
| L1D / L2D refills per 1k instructions (cache misses) | 12.77 / 12.68 · 10.93 / 11.03 | same |
| branch mispredicts per 1k instructions | 5.451 / 5.550 | same |
| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 81,058,791,026 | 81,074,120,790 | 11,418 | 7,099,882 | 19,733 | 13,098 |
| optimized | 80,972,916,265 | 80,973,106,529 | 11,418 | 7,091,698 | 18,632 | 12,228 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | -1.64% — cycles-neutral (same-arm spread 3.39%) | same within noise |
| IPC (instructions per cycle, higher is better) | 0.916 / 0.913 | same |
| backend stall / frontend stall (share of cycles) | 22.4% / 20.8% · 41.7% / 43.7% | more waiting |
| L1D / L2D refills per 1k instructions (cache misses) | 16.74 / 16.71 · 13.31 / 13.25 | same |
| branch mispredicts per 1k instructions | 4.831 / 4.784 | same |
Mechanism. In game/layers.rs:82 and apply_continuous_effect_filtered at :8960, a bare TargetFilter::SpecificObject still enumerates its zone and tests every candidate. Add a fast path that retains only the named ID when it occurs in the existing zone-cache population. Keep the existing matcher, condition checks, incremental restriction and previously retained affected set authoritative.
Evidence. xn5.67, docs/stage0-decision-memo.md:L4904, attributes 2.86% inclusive CPU to apply_continuous_effect_filtered. Its owners artifact attributes 0.8% to effect_candidate_ids. These overlap and must not be summed. The profile predates the loop's recipient-buffer improvement; narrowing the number of objects tested is a distinct mechanism. Exact-ID coverage and its removable share are unmeasured.
Counter and kill threshold. Existing xn5.67 profile rows: apply_continuous_effect_filtered 2.86% inclusive and effect_candidate_ids 0.8% nearest-owner CPU. Expected instruction reduction: 0.5–1.2% per action, an estimate requiring the loop's 4,000-action gate.
Invariant. A bare SpecificObject filter cannot accept another ID. Preserve membership in the existing cached zone population; an object's zone field alone is insufficient. Permanent differential tests must compare complete derived states across battlefield, hand and stack recipients, missing IDs, phased-out recipients, duplicate ledger entries, non-materialized zones, incremental restrictions and effects already carrying retained affected sets.
| Role | Harness / model | Time | Exit | Tokens in / out | Note |
|---|---|---|---|---|---|
| planner | codex / gpt-6.1-sol | 17m 31s | 0 | 5,662,094 / 17,990 | |
| executor | codex / gpt-6-luna | 38m 12s | 0 | 8,576,283 / 18,300 | |
| reviewer | codex / gpt-6.1-sol | 2m 8s | 0 | 20,304 / 943 | |
| executor | codex / gpt-6-luna | 35m 50s | 0 | 7,018,293 / 14,376 | |
| reviewer | codex / gpt-6.1-sol | 0m 39s | 0 | 24,160 / 685 |
| 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 it37-build |
| ir1k | pass | 0 | Ir -0.01% within +/-1%, same-arm spread 0.0151% | optimized 22,100,398,331 vs legacy 22,102,828,844 instructions; fingerprints match: True |
| ir4k | FAIL | 0 | Ir -0.11% within +/-1%, same-arm spread 0.0202% | optimized 80,973,967,869 vs legacy 81,063,554,464 instructions; fingerprints match: True |
Status: rejected (loop, instruction-count gate; wall-clock not yet confirmed)
Automated loop result on homelab (aarch64). Switch PHASE_LAYER_IDENTITY_RECIPIENT_LEGACY, mechanism class compute. Mechanism: In game/layers.rs:82 and apply_continuous_effect_filtered at :8960, a bare TargetFilter::SpecificObject still enumerates its zone and tests every candidate. Add a fast path that retains only the named ID when it occurs in the existing zone-cache population. Keep the existing matcher, condition checks, incremental restriction and previously retained affected set authoritative. Invariant: A bare SpecificObject filter cannot accept another ID. Preserve membership in the existing cached zone population; an object's zone field alone is insufficient. Permanent differential tests must compare complete derived states across battlefield, hand and stack recipients, missing IDs, phased-out recipients, duplicate ledger entries, non-materialized zones, incremental restrictions and effects already carrying retained affected sets.
| 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.01% within +/-1%, same-arm spread 0.0151% |
| ir4k | NO | Ir -0.11% within +/-1%, same-arm spread 0.0202% |
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:13 · read-only · refreshes every 30 s