PHASE_LAYER_RECIPIENT_IDS_LEGACY · branch loop/it8 · base 4ec0b9ef1 · candidate 4a27f20e2 · took 14h 13m| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 22,038,896,846 | 22,039,534,296 | 4,000 | 5,509,804 | 2,585 | 2,340 |
| optimized | 21,997,555,301 | 21,992,301,788 | 4,000 | 5,498,732 | 2,811 | 2,735 |
perf: indicative only, not a clean timing.| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 80,729,379,831 | 80,750,972,689 | 11,418 | 7,071,306 | 22,490 | 14,186 |
| optimized | 79,700,404,646 | 79,692,301,400 | 11,418 | 6,979,887 | 20,069 | 13,499 |
perf: indicative only, not a clean timing.Mechanism. At layers.rs:82, effect_candidate_ids rebuilds a HashSet and Vec for every effect, although LayerZoneObjectCache already stores the zone's IDs. Deduplicate each cached zone vector once, preserving first-occurrence order. Return a borrowed slice for single-zone filters and retain the existing union algorithm for multi-zone filters.
Evidence. xn5.67, docs/stage0-decision-memo.md:4904, is the latest indexed CPU profile. Its accompanying bench/reports/uprof-xn565-20260923-owners-alloc.txt attributes 0.4% of process CPU directly to allocation beneath layers::effect_candidate_ids. The containing apply_continuous_effect_filtered family measured 2.86% inclusive CPU. These overlap; the latter is only a ceiling. The profile predates subsequent retained changes, so neither share is a current speedup prediction.
Counter and kill threshold. Existing xn5.67 allocation-owner row: layers::effect_candidate_ids, 0.4% process CPU. Hashing and vector construction add unseparated work. Expected 4,000-action instruction reduction: 0.4–0.9% per action, an unmeasured forecast likely to enter the marginal band. Apply the loop's existing tiers unchanged.
Invariant. Candidate IDs retain exactly the same order and stable deduplication, including duplicated IDs in a zone vector. Cache only raw IDs; evaluate filters and conditions against live state for every effect. A permanent differential regression must compare both paths for single-zone, overlapping multi-zone, duplicate-ID and resolving-stack fixtures, plus a keyword grant that changes a later layer's filter result.
| Role | Harness / model | Time | Exit | Tokens in / out | Note |
|---|---|---|---|---|---|
| planner | codex / gpt-6.1-sol | 8m 2s | 0 | 2,453,126 / 9,353 | |
| executor | codex / gpt-6-luna | 50m 8s | 0 | 9,543,594 / 18,820 | |
| reviewer | codex / gpt-6.1-sol | 0m 56s | 0 | 20,497 / 1,271 | |
| executor | codex / gpt-6-luna | 52m 8s | 0 | 18,811,237 / 26,871 | |
| reviewer | codex / gpt-6.1-sol | 1m 12s | 0 | 23,459 / 1,482 |
| Gate | Result | Exit | Detail |
|---|---|---|---|
| fmt | pass | 0 | cargo fmt --all -- --check |
| ir1k | pass | 0 | Ir -0.20% within +/-1%, same-arm spread 0.0239% | optimized 21,994,928,544 vs legacy 22,039,215,571 instructions; fingerprints match: True |
| ir4k | pass | 0 | Ir -1.29% (threshold -1%), same-arm spread 0.0267% | optimized 79,696,353,023 vs legacy 80,740,176,260 instructions; fingerprints match: True |
| check | pass | 0 | |
| focused | pass | 0 | |
| build | pass | 0 | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode build -CargoProfile bench-fast-inc -Label it8-build |
| parity | pass | 0 | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode parity -Seeds 1,2,3,5,7,11,13 -Actions 1000 -CargoProfile bench-fast-inc -Label it8-parity |
Status: rejected (loop, instruction-count gate; wall-clock not yet confirmed)
Automated loop result on homelab (aarch64). Switch PHASE_LAYER_RECIPIENT_IDS_LEGACY, mechanism class allocation. Mechanism: At layers.rs:82, effect_candidate_ids rebuilds a HashSet and Vec for every effect, although LayerZoneObjectCache already stores the zone's IDs. Deduplicate each cached zone vector once, preserving first-occurrence order. Return a borrowed slice for single-zone filters and retain the existing union algorithm for multi-zone filters. Invariant: Candidate IDs retain exactly the same order and stable deduplication, including duplicated IDs in a zone vector. Cache only raw IDs; evaluate filters and conditions against live state for every effect. A permanent differential regression must compare both paths for single-zone, overlapping multi-zone, duplicate-ID and resolving-stack fixtures, plus a keyword grant that changes a later layer's filter result.
| 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.20% within +/-1%, same-arm spread 0.0239% |
| ir4k | yes | Ir -1.29% (threshold -1%), same-arm spread 0.0267% |
| check | yes | |
| focused | yes | |
| parity | NO | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode parity -Seeds 1,2,3,5,7,11,1 |
Wall-clock confirmation on the workstation is required before this counts as a speedup; instruction count is a screen, not a time prediction.
Status: unknown (loop, instruction-count gate; wall-clock not yet confirmed)
Automated loop result on homelab (aarch64). Switch PHASE_LAYER_RECIPIENT_IDS_LEGACY, mechanism class allocation. Mechanism: At layers.rs:82, effect_candidate_ids rebuilds a HashSet and Vec for every effect, although LayerZoneObjectCache already stores the zone's IDs. Deduplicate each cached zone vector once, preserving first-occurrence order. Return a borrowed slice for single-zone filters and retain the existing union algorithm for multi-zone filters. Invariant: Candidate IDs retain exactly the same order and stable deduplication, including duplicated IDs in a zone vector. Cache only raw IDs; evaluate filters and conditions against live state for every effect. A permanent differential regression must compare both paths for single-zone, overlapping multi-zone, duplicate-ID and resolving-stack fixtures, plus a keyword grant that changes a later layer's filter result.
| gate | passed | detail |
|---|---|---|
| fmt | yes | cargo fmt --all -- --check |
| ir1k | yes | Ir -0.20% within +/-1%, same-arm spread 0.0239% |
| ir4k | yes | Ir -1.29% (threshold -1%), same-arm spread 0.0267% |
| check | yes | |
| focused | yes | |
| build | yes | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode build -CargoProfile bench-fa |
| parity | yes | pwsh -NoProfile -File scripts/bench_phase.ps1 -Mode parity -Seeds 1,2,3,5,7,11,1 |
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:08 · read-only · refreshes every 30 s