PHASE_FILTER_SOURCE_PAYLOAD_LEGACY · branch loop/it26 · base 4ec0b9ef1 · candidate a6761da32 · took 2h 42m| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 21,783,309,461 | 21,784,300,872 | 4,000 | 5,445,951 | 2,951 | 2,974 |
| optimized | 21,769,529,497 | 21,769,013,679 | 4,000 | 5,442,318 | 2,984 | 2,849 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | -0.80% — cycles-neutral (same-arm spread 6.87%) | same within noise |
| IPC (instructions per cycle, higher is better) | 1.025 / 0.990 | same |
| backend stall / frontend stall (share of cycles) | 17.5% / 17.2% · 42.9% / 43.2% | same |
| L1D / L2D refills per 1k instructions (cache misses) | 12.88 / 12.93 · 11.03 / 11.20 | same |
| branch mispredicts per 1k instructions | 5.762 / 6.074 | fewer |
| Arm | Run 1 instructions | Run 2 | Actions | Instr / action | contract ms | apply ms |
|---|---|---|---|---|---|---|
| legacy | 78,414,887,539 | 78,425,580,114 | 11,418 | 6,868,123 | 19,408 | 13,524 |
| optimized | 77,825,399,116 | 77,846,308,526 | 11,418 | 6,816,943 | 17,514 | 11,382 |
perf: indicative only, not a clean timing.| Hardware counters (optimized / legacy) | Value | Reading |
|---|---|---|
| cycles, minimum of the repeats | -1.22% — cycles-neutral (same-arm spread 3.96%) | same within noise |
| IPC (instructions per cycle, higher is better) | 0.914 / 0.898 | same |
| backend stall / frontend stall (share of cycles) | 20.3% / 18.1% · 43.8% / 47.2% | more waiting |
| L1D / L2D refills per 1k instructions (cache misses) | 17.39 / 17.24 · 13.64 / 13.55 | same |
| branch mispredicts per 1k instructions | 4.944 / 4.977 | same |
Mechanism. In game/filter.rs, source_context_from_filter_with_family clones saddled_by, convoked_creatures, linked_exile_snapshot, chosen_attributes, and the chosen creature-type string into an ephemeral, read-only SourceContext. Represent these payloads with borrowed-or-owned views: borrow in the optimized arm and preserve the current copies in the legacy arm.
Evidence. xn5.67, memo L4904, references bench/reports/uprof-xn565-20260923-owners-all.txt, where source_context_from_filter_with_family owns 1.1% of process CPU. xn5.50, memo L3603, established the existing borrowed source authority and lazy LKI mechanism. The auxiliary-copy fraction is unmeasured; 1.1% bounds the containing function, not the savings. The profile predates later loop changes.
Counter and kill threshold. Existing source_contexts_built/source_contexts_lki_materialized counters and xn5.67's 1.1% source-context owner row. Expected instruction reduction: approximately 0.3–0.7% per action at 4,000 actions, with substantial uncertainty about nonempty payload frequency. Copy and allocation savings may be under-reported by instructions.
Invariant. Borrow precisely the payload the old path copied, preserving the distinction between exact-live source facts and latched trigger choices. SourceContext remains confined to an immutable evaluation and never escapes. Keep the existing LKI materialization and incarnation checks unchanged. A permanent owned-versus-borrowed differential regression must cover live, latched, cached-LKI, missing-source, and recycled-id cases with nonempty auxiliary payloads.
| Role | Harness / model | Time | Exit | Tokens in / out | Note |
|---|---|---|---|---|---|
| planner | codex / gpt-6.1-sol | 8m 53s | 0 | 3,343,192 / 11,123 | |
| executor | codex / gpt-6-luna | 1h 8m | 0 | 10,288,588 / 20,633 | |
| reviewer | codex / gpt-6.1-sol | 0m 55s | 0 | 25,175 / 1,336 |
| 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 it26-build |
| ir1k | pass | 0 | Ir -0.06% within +/-1%, same-arm spread 0.0114% | optimized 21,769,612,674 vs legacy 21,783,145,029 instructions; fingerprints match: True |
| ir4k | FAIL | 0 | Ir -0.74% within +/-1%, same-arm spread 0.0269% | optimized 77,834,662,036 vs legacy 78,415,739,527 instructions; fingerprints match: True |
| check | pass | 0 | |
| focused | pass | 0 | |
| 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 it26-parity |
Status: unknown (loop, instruction-count gate; wall-clock not yet confirmed)
Automated loop result on homelab (aarch64). Switch PHASE_FILTER_SOURCE_PAYLOAD_LEGACY, mechanism class copy. Mechanism: In game/filter.rs, source_context_from_filter_with_family clones saddled_by, convoked_creatures, linked_exile_snapshot, chosen_attributes, and the chosen creature-type string into an ephemeral, read-only SourceContext. Represent these payloads with borrowed-or-owned views: borrow in the optimized arm and preserve the current copies in the legacy arm. Invariant: Borrow precisely the payload the old path copied, preserving the distinction between exact-live source facts and latched trigger choices. SourceContext remains confined to an immutable evaluation and never escapes. Keep the existing LKI materialization and incarnation checks unchanged. A permanent owned-versus-borrowed differential regression must cover live, latched, cached-LKI, missing-source, and recycled-id cases with nonempty auxiliary payloads.
| 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.06% within +/-1%, same-arm spread 0.0114% |
| ir4k | marginal: workstation check | Ir -0.74% within +/-1%, same-arm spread 0.0269% |
| check | yes | |
| focused | yes | |
| 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:17 · read-only · refreshes every 30 s