Shaders: reuse decoded instructions across range rebuilds #3357

Closed
borosf wants to merge 1 commit from upstream-pr/3357 into main
borosf commented 2026-11-26 20:24:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-26T20:24:03Z.


Summary

  • Decode a program once in range::build and reuse its decoded instructions across M0-bound induction rebuilds.
  • Keep the existing move-only path for programs without v_movrel*, avoiding clone overhead in the common case.
  • Add a synthetic M0-bounded v_movreld_b32 loop regression. The cached path accepts an already-decoded stream; the legacy reference takes more than one decode/build round, and the test compares their IR and structured output.

Claim: https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7202146756

Census timing

Warmed binaries, wall-clock median of five on this machine (CARGO_TARGET_DIR=C:\\Users\\bkora\\VIctory\\target):

cargo test --release -p victory-shader --lib --locked -- --exact emit::census_tests::every_opcode_translate_or_refuse_never_panic
version five runs (s) median
main 0.316, 0.293, 0.297, 0.290, 0.287 0.293 s
this PR 0.300, 0.368, 0.308, 0.317, 0.303 0.308 s

This all-opcode synthetic census completes its test body in 0.03–0.04 s, so Cargo/process startup dominates these wall-clock samples; it does not include a loop-heavy title shader. The change specifically removes repeated decode work for M0-bounded relative-move loops.

Verification

cargo test -p victory-shader --lib --locked --no-fail-fast -- --test-threads=1

Result: 301 passed, 2 failed, 3 ignored. The two failures match pristine-main Intel Arc B580 baseline failures:

  • emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros
  • emit::valu_tests::fspx_programs_run_with_the_hardwares_dot_products
cargo test -p victory-shader --lib --locked -- --exact range::tests::an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure --test-threads=1
cargo clippy -p victory-shader --all-targets --locked -- -D warnings
cargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings
cargo xtask policy

All passed. cargo xtask policy: 191 files OK.

Formatting was checked without cargo fmt:

rustfmt --config-path rustfmt.toml --edition 2024 --check crates/victory-shader/src/ir.rs
rustfmt --config-path rustfmt.toml --edition 2024 --check crates/victory-shader/src/range.rs

ir.rs: 2/2 rustfmt diff hunks versus origin/main; range.rs: 0/0.

Synthetic tests only; no game data used.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5516676226 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3357). Originally posted by [borosf](https://github.com/borosf) on 2026-11-26T20:24:03Z. --- ## Summary - Decode a program once in `range::build` and reuse its decoded instructions across M0-bound induction rebuilds. - Keep the existing move-only path for programs without `v_movrel*`, avoiding clone overhead in the common case. - Add a synthetic M0-bounded `v_movreld_b32` loop regression. The cached path accepts an already-decoded stream; the legacy reference takes more than one decode/build round, and the test compares their IR and structured output. Claim: https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7202146756 ## Census timing Warmed binaries, wall-clock median of five on this machine (`CARGO_TARGET_DIR=C:\\Users\\bkora\\VIctory\\target`): ```powershell cargo test --release -p victory-shader --lib --locked -- --exact emit::census_tests::every_opcode_translate_or_refuse_never_panic ``` | version | five runs (s) | median | | --- | --- | --- | | `main` | 0.316, 0.293, 0.297, 0.290, 0.287 | 0.293 s | | this PR | 0.300, 0.368, 0.308, 0.317, 0.303 | 0.308 s | This all-opcode synthetic census completes its test body in 0.03–0.04 s, so Cargo/process startup dominates these wall-clock samples; it does not include a loop-heavy title shader. The change specifically removes repeated decode work for M0-bounded relative-move loops. ## Verification ```powershell cargo test -p victory-shader --lib --locked --no-fail-fast -- --test-threads=1 ``` Result: 301 passed, 2 failed, 3 ignored. The two failures match pristine-main Intel Arc B580 baseline failures: - `emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` - `emit::valu_tests::fspx_programs_run_with_the_hardwares_dot_products` ```powershell cargo test -p victory-shader --lib --locked -- --exact range::tests::an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure --test-threads=1 cargo clippy -p victory-shader --all-targets --locked -- -D warnings cargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings cargo xtask policy ``` All passed. `cargo xtask policy`: 191 files OK. Formatting was checked without `cargo fmt`: ```powershell rustfmt --config-path rustfmt.toml --edition 2024 --check crates/victory-shader/src/ir.rs rustfmt --config-path rustfmt.toml --edition 2024 --check crates/victory-shader/src/range.rs ``` `ir.rs`: 2/2 rustfmt diff hunks versus `origin/main`; `range.rs`: 0/0. Synthetic tests only; no game data used.
Dukestar69 commented 2026-11-26 20:29:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T20:29:29Z.

Review: APPROVED


LGTM — verified on Windows against origin/main (63bcca4).

  • Reusing decoded instructions across range-guided IR rebuilds avoids redundant GFX10 decoding while keeping identical IR and structure output.
  • cargo test -p victory-shader --lib ir:: -- --test-threads=1: 9 passed, 0 failed.
  • cargo test -p victory-shader --lib range:: -- --test-threads=1: 4 passed, 0 failed (including an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6080171989 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3357#pullrequestreview-6080171989). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T20:29:29Z. **Review:** APPROVED --- LGTM — verified on Windows against `origin/main` (`63bcca4`). - Reusing decoded instructions across range-guided IR rebuilds avoids redundant GFX10 decoding while keeping identical IR and structure output. - `cargo test -p victory-shader --lib ir:: -- --test-threads=1`: 9 passed, 0 failed. - `cargo test -p victory-shader --lib range:: -- --test-threads=1`: 4 passed, 0 failed (including `an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure`). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
borosf commented 2026-11-26 20:38:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-26T20:38:16Z.


Independent local verification at head f389683 on Windows 11 x64, Intel Arc B580 12 GB:

cargo test -p victory-shader --lib --locked --no-fail-fast -- --test-threads=1
cargo clippy -p victory-shader --all-targets --locked -- -D warnings
cargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings
cargo test --release -p victory-shader --lib --locked -- --exact emit::census_tests::every_opcode_translate_or_refuse_never_panic   (5 runs, PR vs main)
  • Tests: 301 passed / 2 failed / 3 ignored — the 2 are the known B580 baseline (emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, emit::valu_tests::fspx_programs_run_with_the_hardwares_dot_products), pristine main fails them too. New regression test range::tests::an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure passes.
  • Clippy: exit 0 both feature sets with -D warnings.
  • Census, 5 release runs each: PR 368/354/354/342/359 ms (mean 355.4) vs main 367/354/356/350/347 ms (mean 354.8) — delta is noise; the inner test body is ~0.03 s both, so process startup dominates. No regression; the decode-once win lands on loop-heavy title shaders the all-opcode census doesn't contain, as the PR body says.
  • Diff read: caching of the decoded stream only affects the M0-bound rebuild path in range.rs; the non-movrel path is untouched.

Synthetic tests only; no game data used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7202919030 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3357#issuecomment-7202919030). Originally posted by [borosf](https://github.com/borosf) on 2026-11-26T20:38:16Z. --- Independent local verification at head `f389683` on Windows 11 x64, Intel Arc B580 12 GB: ``` cargo test -p victory-shader --lib --locked --no-fail-fast -- --test-threads=1 cargo clippy -p victory-shader --all-targets --locked -- -D warnings cargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings cargo test --release -p victory-shader --lib --locked -- --exact emit::census_tests::every_opcode_translate_or_refuse_never_panic (5 runs, PR vs main) ``` - Tests: 301 passed / 2 failed / 3 ignored — the 2 are the known B580 baseline (`emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `emit::valu_tests::fspx_programs_run_with_the_hardwares_dot_products`), pristine main fails them too. New regression test `range::tests::an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure` passes. - Clippy: exit 0 both feature sets with `-D warnings`. - Census, 5 release runs each: PR 368/354/354/342/359 ms (mean 355.4) vs main 367/354/356/350/347 ms (mean 354.8) — delta is noise; the inner test body is ~0.03 s both, so process startup dominates. No regression; the decode-once win lands on loop-heavy title shaders the all-opcode census doesn't contain, as the PR body says. - Diff read: caching of the decoded stream only affects the M0-bound rebuild path in `range.rs`; the non-movrel path is untouched. Synthetic tests only; no game data used.
fuzeofficlal commented 2026-11-26 21:02:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T21:02:16Z.

Review: APPROVED


LGTM — verified against origin/main (63bcca43) on Windows x64.

  • Decode reuse correctness: Caching the decoded instruction stream in range::build and passing it through ir::build_bounded_decoded preserves identical IR and structured control flow across M0-bounded rebuilds, while leaving non-v_movrel* programs on the existing move-only path without extra cloning.
  • Minor non-blocking test note (P3): In range::tests::an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure (crates/victory-shader/src/range.rs), legacy_decodes counts the legacy reference passes in the test closure rather than directly instrumenting range::build.
  • Checks:
    • cargo test --locked -p victory-shader --lib -- --test-threads=1 ir:: range:: structure:: resource::: 61 passed, 0 failed, 1 ignored (including an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure).
    • cargo clippy -p victory-shader --all-targets --locked -- -D warnings (default and --all-features): clean.
    • cargo xtask policy: 191 files ok; rustfmt --edition 2024: clean on changed hunks.

Synthetic tests only; no game data used.

<!-- greyfinch-sync:Marvisak/VIctory:review:6080445745 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3357#pullrequestreview-6080445745). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T21:02:16Z. **Review:** APPROVED --- LGTM — verified against `origin/main` (`63bcca43`) on Windows x64. - **Decode reuse correctness**: Caching the decoded instruction stream in `range::build` and passing it through `ir::build_bounded_decoded` preserves identical IR and structured control flow across M0-bounded rebuilds, while leaving non-`v_movrel*` programs on the existing move-only path without extra cloning. - **Minor non-blocking test note (P3)**: In `range::tests::an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure` (`crates/victory-shader/src/range.rs`), `legacy_decodes` counts the legacy reference passes in the test closure rather than directly instrumenting `range::build`. - **Checks**: - `cargo test --locked -p victory-shader --lib -- --test-threads=1 ir:: range:: structure:: resource::`: 61 passed, 0 failed, 1 ignored (including `an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure`). - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings` (default and `--all-features`): clean. - `cargo xtask policy`: 191 files ok; `rustfmt --edition 2024`: clean on changed hunks. Synthetic tests only; no game data used.
evan-kolberg commented 2026-11-26 21:42:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by evan-kolberg on 2026-11-26T21:42:08Z.


Independent M4 Pro ARM64 release timings favor 0xkn0wh3r3’s bounded-first #2079 over decode reuse alone on the generated relative-move path. I used borosf’s #3357 bounded M0 loop at 1, 8, and 32 motifs, with matched direct-move controls, and applied the two PR patches separately to the same Mac composition (5addf0f, based on Mac bf99e728). borosf’s exact #3357 · 0xkn0wh3r3’s exact #2079 · Mac base

Across all six process orderings, median paired relative-loop time fell 0.5–1.9% with decode reuse alone and 6.3–30.9% with bounded-first. At 32 motifs, medians were 3.748 / 3.723 / 3.511 ms for current / #3357 / #2079. Direct controls were within 2% on paired medians. IR, structure, and emitted-DXIL fingerprints matched for all six generated inputs. Timings cover in-process range::build and result destruction, with process startup and DXIL emission outside the timer.

Prepared and tested with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7203978461 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3357#issuecomment-7203978461). Originally posted by [evan-kolberg](https://github.com/evan-kolberg) on 2026-11-26T21:42:08Z. --- Independent M4 Pro ARM64 release timings favor 0xkn0wh3r3’s bounded-first #2079 over decode reuse alone on the generated relative-move path. I used borosf’s #3357 bounded M0 loop at 1, 8, and 32 motifs, with matched direct-move controls, and applied the two PR patches separately to the same Mac composition (`5addf0f`, based on Mac `bf99e728`). [borosf’s exact #3357](https://github.com/borosf/VIctory/commit/f389683feca50ed93c1436a4542378db6635fdf1) · [0xkn0wh3r3’s exact #2079](https://github.com/0xkn0wh3r3/VIctory/commit/99d33d41679076941778d17fc016f39530803625) · [Mac base](https://github.com/pragyaangaur/VIctory-macOS/commit/bf99e728b2fa89c3550d51e07626c0da9bd6ec47) Across all six process orderings, median paired relative-loop time fell **0.5–1.9%** with decode reuse alone and **6.3–30.9%** with bounded-first. At 32 motifs, medians were **3.748 / 3.723 / 3.511 ms** for current / #3357 / #2079. Direct controls were within 2% on paired medians. IR, structure, and emitted-DXIL fingerprints matched for all six generated inputs. Timings cover in-process `range::build` and result destruction, with process startup and DXIL emission outside the timer. Prepared and tested with Codex.
andrewpozdnakov7-jpg commented 2026-11-26 22:16:36 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T22:16:36Z.


I repeated the #2079 comparison on Windows with this exact head and the same generated M0 loop, using 1, 8 and 32 relative-move motifs and matched direct-move controls. The checked IR and structure fingerprints matched main and #2079 for all six inputs. Six fresh release processes per variant ran in balanced order.

For 1 and 8 relative motifs, the median was 93.11 and 957.46 µs on f389683, versus 65.69 and 747.32 µs with #2079 merged onto 63bcca4. The 32-motif ranges overlap. Full setup and Windows results in #2079. This adds a Windows data point to the M4 Pro comparison above.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7204526920 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3357#issuecomment-7204526920). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-26T22:16:36Z. --- I repeated the #2079 comparison on Windows with this exact head and the same generated M0 loop, using 1, 8 and 32 relative-move motifs and matched direct-move controls. The checked IR and structure fingerprints matched main and #2079 for all six inputs. Six fresh release processes per variant ran in balanced order. For 1 and 8 relative motifs, the median was 93.11 and 957.46 µs on `f389683`, versus 65.69 and 747.32 µs with #2079 merged onto `63bcca4`. The 32-motif ranges overlap. [Full setup and Windows results in #2079](https://github.com/Marvisak/VIctory/pull/2079#issuecomment-7204486905). This adds a Windows data point to the M4 Pro comparison above.
borosf commented 2026-11-27 06:38:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-27T06:38:41Z.


Thank you — this is the comparison that decides it, and it does not favour this PR. On the same inputs, #2079 is faster than f389683: 65.69 vs 93.11 µs at 1 relative-move motif and 747.32 vs 957.46 µs at 8, with the 32-motif ranges overlapping.

That matches the mechanism: #2079 avoids building the program at its full range when no bound is proven, whereas this PR reuses decoded instructions across a rebuild that #2079 doesn't do in the first place. So the honest summary is that #2079 subsumes this one for the motifs you measured, and I'd rather the maintainer take the faster change than have both land.

For the record, my own numbers on f389683 (Intel Arc B580, Windows 11): 301 passed / 2 failed = the known B580 baseline, and the opcode census through decode → ir → structure → resource → lower → write is 355.4 µs against 354.8 on main — i.e. this PR's win is only on real relative-move loops, exactly where your fixtures and #2079 live.

@KainanP / @AurumCarlos — unless someone wants this as a smaller, orthogonal step, I'll close #3357 in favour of #2079 when the author of #2079 is ready. Synthetic tests only, no game data.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7211714915 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3357#issuecomment-7211714915). Originally posted by [borosf](https://github.com/borosf) on 2026-11-27T06:38:41Z. --- Thank you — this is the comparison that decides it, and it does not favour this PR. On the same inputs, #2079 is faster than `f389683`: 65.69 vs 93.11 µs at 1 relative-move motif and 747.32 vs 957.46 µs at 8, with the 32-motif ranges overlapping. That matches the mechanism: #2079 avoids building the program at its full range when no bound is proven, whereas this PR reuses decoded instructions across a rebuild that #2079 doesn't do in the first place. So the honest summary is that #2079 subsumes this one for the motifs you measured, and I'd rather the maintainer take the faster change than have both land. For the record, my own numbers on `f389683` (Intel Arc B580, Windows 11): 301 passed / 2 failed = the known B580 baseline, and the opcode census through decode → ir → structure → resource → lower → write is 355.4 µs against 354.8 on main — i.e. this PR's win is only on real relative-move loops, exactly where your fixtures and #2079 live. @KainanP / @AurumCarlos — unless someone wants this as a smaller, orthogonal step, I'll close #3357 in favour of #2079 when the author of #2079 is ready. Synthetic tests only, no game data.
futurepro62 commented 2026-11-27 07:07:28 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-27T07:07:28Z.


NVIDIA full-suite run, to go with the reports above by Dukestar69, fuzeofficlal, since none of them names a GPU run. Tested exact head f389683 (on its base 63bcca4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 867 passed, 0 failed, 10 ignored.
  • The new tests ran and passed: an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7212165266 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3357#issuecomment-7212165266). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-27T07:07:28Z. --- NVIDIA full-suite run, to go with the reports above by Dukestar69, fuzeofficlal, since none of them names a GPU run. Tested exact head `f389683` (on its base `63bcca4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **867 passed, 0 failed, 10 ignored**. - The new tests ran and passed: `an_m0_bounded_loop_decodes_once_and_keeps_its_ir_and_structure`. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
borosf commented 2026-11-27 07:33:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-27T07:33:14Z.


Closing in favour of #2079, on the evidence in @andrewpozdnakov7-jpg's Windows run above: on the same generated M0 loops, #2079 is 65.69 vs 93.11 µs at 1 relative-move motif and 747.32 vs 957.46 µs at 8, with the 32-motif ranges overlapping. That is the mechanism, not noise — #2079 does not build the program at its full range when no bound is proven, so the rebuild this PR memoises does not happen there at all.

For the record, my own numbers at f389683 (Arc B580, Windows 11): 301 passed / 2 failed (the known B580 baseline), and the opcode census through decode → ir → structure → resource → lower → write was 355.4 µs against 354.8 on main — this PR's win existed only on real relative-move loops, exactly where #2079 is better.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7212584819 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3357#issuecomment-7212584819). Originally posted by [borosf](https://github.com/borosf) on 2026-11-27T07:33:14Z. --- Closing in favour of #2079, on the evidence in @andrewpozdnakov7-jpg's Windows run above: on the same generated M0 loops, #2079 is 65.69 vs 93.11 µs at 1 relative-move motif and 747.32 vs 957.46 µs at 8, with the 32-motif ranges overlapping. That is the mechanism, not noise — #2079 does not build the program at its full range when no bound is proven, so the rebuild this PR memoises does not happen there at all. For the record, my own numbers at `f389683` (Arc B580, Windows 11): 301 passed / 2 failed (the known B580 baseline), and the opcode census through decode → ir → structure → resource → lower → write was 355.4 µs against 354.8 on main — this PR's win existed only on real relative-move loops, exactly where #2079 is better.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!3357
No description provided.