perf(lift): 1.2 GB less in a Windows lift's own process, so more emit workers start: about a fifth faster, the same C #1128

Merged
HumanBean merged 2 commits from madebyjordan/Longshot:perf/lift-memory into main 2026-11-16 16:43:07 +00:00
Member

Type: perf · Risk: low · Tested on: Windows 11, RX 6700 XT · Needs: Linux, any GPU (a lift compared with main's)

Why

After #1116, a Windows lift's emit is limited by how many worker processes it may start: one per 0.75 GB free, and the
lift's own process held 4.2 GB after discovery, so a 16 GB PC got 2-4 of them. About 1.2 GB of that was duplicates:
each of OoT's 12.7 million plain instructions stored as a tuple of its own, though there are only 1.16 million distinct
ones. The workers also ran the kit's flag liveness pass on functions that write no flag, where it always finds nothing.

What changed

The lift's process needs 1.2 GB less, so the same PC starts more emit workers; the workers do a little less work each. The
lifted C is the same, byte for byte.

  • discovery (nx2/walk.py, new; installed by nx2/lift.py): the kit's Lifter.walk, visiting the same instructions in
    the same order, with every plain op of one word stored as one shared (("op",), word) tuple (made as the walk goes:
    sharing them afterwards frees nothing back to Windows) and the image's lookups (#1116's EdenImage view and ranges)
    read inline. tests/test_walk.py compares it with the kit's walk over a made-up image of random words, through both
    the fast and the plain image lookups, and pins the kit's tree-sha256 so an a64-kit refresh fails until it is compared
    again.
  • emit (nx2/dead_flags.py, new; nx2/fastfp.py): Lifter.dead_flags answers {} at once for a function with no
    instruction that writes a flag (58% of OoT's functions) and calls the kit's method otherwise; tests/test_dead_flags.py
    compares the two over 3,000 made-up functions. ff_region takes A64_FASTFP_MIN from emit_function, which reads it
    once a function instead of once for each of 3.8 million runs.

Measurements

Verdict: faster, same output. At the default worker count, as the launcher runs it, the Windows lift's median fell
from 154.8 s to 125.7 s (-19%): the memory gate allowed 5-6 emit workers where main got 3-4. The lift's process holds
4.19 GB after discovery on main and 3.02 GB here.

Hardware: Windows 11, Ryzen 5 5600 (6 cores, 12 threads), 16 GB, Crucial P3 NVMe, RX 6700 XT
Scene: none (the lift alone)
Method: nx2/lift.py --standalone --write as make_game.py runs it (RX_RELEASE=1 A64_HOT_CHUNK=1, the launcher's
image/chunks.txt, the nightly-336 tools' Python 3.14 and llvm-mingw), the default LONGSHOT_LIFT_JOBS (each side's own
memory gate decides), through scripts/job_queue.py --mode timing-cpu; 2 interleaved pairs, the median. Memory: the
process's working set right after discover(), measured twice each side in a separate script.
How to reproduce: python -I nx2/lift.py --standalone --write --work NEW_FOLDER with OOT_EXEFS set, on each side, then
compare sha1sum NEW_FOLDER/sa/gen/*.

Before: main @ 71b1edd8 After: this PR @ 68f5e131
whole lift (run 1 / run 2) 146.9 s / 162.7 s 121.6 s / 129.8 s
whole lift, median 154.8 s 125.7 s (-19%)
emit workers the gate allowed 4 / 3 6 / 5
emit and write 42.1 s / 60.5 s 27.2 s / 29.6 s
discovery 39 s / 40 s 36 s / 39 s
lift's process after discovery (working set) 4,189 / 4,189 MB 3,021 / 3,020 MB
lifted C 102 files the same 102 files, byte for byte

At the same worker count the workers' own time fell about 6% (profiled in each worker: 105 s busy each before the
dead_flags and A64_FASTFP_MIN change, 99 s after, 4 workers), so most of the gain is the extra workers.

main, run 2:
discovered 294522 functions (40s)
lift: coverage in 20.1s (60s)
lift: emit and write (3 processes) in 60.5s (121s)
lift: big chunks split in 9.3s (130s)
lift: patches (3 processes) in 11.9s (142s)
lift: output size and page-mark groups in 17.9s (160s)
this PR, run 2:
discovered 294522 functions (39s)
lift: coverage in 26.6s (65s)
lift: emit and write (5 processes) in 29.6s (95s)
lift: big chunks split in 7.6s (103s)
lift: patches (5 processes) in 12.1s (115s)
lift: output size and page-mark groups in 11.9s (127s)

Flags and settings

None.

Testing

Tested:

  • The lifted C of every lift above, both sides, compared file by file (sha1 of all 102 files in sa/gen): identical.
    Against the launcher's nightly-336 build on this PC (09:33 today), which then ran about 22 minutes of play (80,813
    frames presented, Windows 11, RX 6700 XT, AMD 26.10.1), 101 of the 102 files are the same; the other is a64_fpx.h,
    changed on main by #1002 (always_inline helpers), not here.
  • tests/test_walk.py fails if the walk doesn't stop at another entry, leaves a conditional branch's target unvisited,
    or shares the entry of a word that classifies as a branch; tests/test_dead_flags.py fails if the shortcut looks at the
    first op only or at the flags an op reads (each checked by hand).
  • python -I -B tests/run_all.py on Windows: 570 passed, 23 failed, 86 skipped; main @ 71b1edd8: 569 passed, 22 failed.
    The failures are the same 22 (test_vk_occlusion_queries, test_crash_dialog, test_linux_preflight,
    test_job_queue, test_make_game_cache, test_bug_report_defaults, test_run_all_changed,
    test_tested_configurations, test_portable_builder_home, test_pending_guest_import, test_missing_nup,
    test_guest_imported, test_walk_key, test_pads_after_menu, test_auto_handheld,
    test_failed_compile_keeps_objects, test_portable_builder_startup, test_bug_report, test_crt_options,
    test_audio_output_devices, test_hardware_report, test_dlss_feature_size) plus test_longshot_ctl here, which is
    flaky on main too (test_the_session_follows_a_relaunch: run alone twice each, it failed once on main and passed
    twice here). The two extra passes are the new checks.

Not tested: a lift on Linux or macOS (the walk and dead_flags run there too; the forked emit's worker count is
gated at 2 GB each, so the memory saved matters less there), and the lift inside a whole make_game.py build.

Must be tested:

  • Linux, any GPU (I'm on Windows): a lift of the same game on main and on this PR
    (python -I nx2/lift.py --standalone --write --work NEW_FOLDER, or a make_game.py build of each), expecting the same
    sha1 for every file of the work folder's sa/gen (Test Farm: @Beanstalk linux, the lift on main and on this PR,
    comparing the files of sa/gen)

Risks

What could break: the lift's discovery or emit, where it would show as a failed lift or C that differs from main's.
The walk relies on a plain op's classification not depending on its pc (true of the kit's and nx2/insn.py's
classify; tests/test_lift_lookups.py from #1116 checks it). More emit workers on Windows means more memory in use during
the emit; free memory stayed above 1.6 GB on this PC at 5 workers, where main at 3 went down to 0.7 GB.

Turning it off: revert the commits.

Compatibility: the lift key changes (translator files changed), so the next update translates the game once. The C
is the same as before, so the compile finds the same object keys; shader caches are not touched.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.

🤖 Generated with Claude Code

**Type:** perf · **Risk:** low · **Tested on:** Windows 11, RX 6700 XT · **Needs:** Linux, any GPU (a lift compared with main's) ## Why After #1116, a Windows lift's emit is limited by how many worker processes it may start: one per 0.75 GB free, and the lift's own process held 4.2 GB after discovery, so a 16 GB PC got 2-4 of them. About 1.2 GB of that was duplicates: each of OoT's 12.7 million plain instructions stored as a tuple of its own, though there are only 1.16 million distinct ones. The workers also ran the kit's flag liveness pass on functions that write no flag, where it always finds nothing. ## What changed The lift's process needs 1.2 GB less, so the same PC starts more emit workers; the workers do a little less work each. The lifted C is the same, byte for byte. - discovery (`nx2/walk.py`, new; installed by `nx2/lift.py`): the kit's `Lifter.walk`, visiting the same instructions in the same order, with every plain op of one word stored as one shared `(("op",), word)` tuple (made as the walk goes: sharing them afterwards frees nothing back to Windows) and the image's lookups (#1116's `EdenImage` view and ranges) read inline. `tests/test_walk.py` compares it with the kit's walk over a made-up image of random words, through both the fast and the plain image lookups, and pins the kit's tree-sha256 so an a64-kit refresh fails until it is compared again. - emit (`nx2/dead_flags.py`, new; `nx2/fastfp.py`): `Lifter.dead_flags` answers `{}` at once for a function with no instruction that writes a flag (58% of OoT's functions) and calls the kit's method otherwise; `tests/test_dead_flags.py` compares the two over 3,000 made-up functions. `ff_region` takes `A64_FASTFP_MIN` from `emit_function`, which reads it once a function instead of once for each of 3.8 million runs. ## Measurements **Verdict:** faster, same output. At the default worker count, as the launcher runs it, the Windows lift's median fell from 154.8 s to 125.7 s (-19%): the memory gate allowed 5-6 emit workers where main got 3-4. The lift's process holds 4.19 GB after discovery on main and 3.02 GB here. Hardware: Windows 11, Ryzen 5 5600 (6 cores, 12 threads), 16 GB, Crucial P3 NVMe, RX 6700 XT Scene: none (the lift alone) Method: `nx2/lift.py --standalone --write` as `make_game.py` runs it (`RX_RELEASE=1 A64_HOT_CHUNK=1`, the launcher's `image/chunks.txt`, the nightly-336 tools' Python 3.14 and llvm-mingw), the default `LONGSHOT_LIFT_JOBS` (each side's own memory gate decides), through `scripts/job_queue.py --mode timing-cpu`; 2 interleaved pairs, the median. Memory: the process's working set right after `discover()`, measured twice each side in a separate script. How to reproduce: `python -I nx2/lift.py --standalone --write --work NEW_FOLDER` with `OOT_EXEFS` set, on each side, then compare `sha1sum NEW_FOLDER/sa/gen/*`. | | Before: main @ 71b1edd8 | After: this PR @ 68f5e131 | |---|---|---| | whole lift (run 1 / run 2) | 146.9 s / 162.7 s | 121.6 s / 129.8 s | | whole lift, median | 154.8 s | 125.7 s (-19%) | | emit workers the gate allowed | 4 / 3 | 6 / 5 | | emit and write | 42.1 s / 60.5 s | 27.2 s / 29.6 s | | discovery | 39 s / 40 s | 36 s / 39 s | | lift's process after discovery (working set) | 4,189 / 4,189 MB | 3,021 / 3,020 MB | | lifted C | 102 files | the same 102 files, byte for byte | At the same worker count the workers' own time fell about 6% (profiled in each worker: 105 s busy each before the dead_flags and A64_FASTFP_MIN change, 99 s after, 4 workers), so most of the gain is the extra workers. ``` main, run 2: discovered 294522 functions (40s) lift: coverage in 20.1s (60s) lift: emit and write (3 processes) in 60.5s (121s) lift: big chunks split in 9.3s (130s) lift: patches (3 processes) in 11.9s (142s) lift: output size and page-mark groups in 17.9s (160s) this PR, run 2: discovered 294522 functions (39s) lift: coverage in 26.6s (65s) lift: emit and write (5 processes) in 29.6s (95s) lift: big chunks split in 7.6s (103s) lift: patches (5 processes) in 12.1s (115s) lift: output size and page-mark groups in 11.9s (127s) ``` ### Flags and settings None. ## Testing **Tested:** - The lifted C of every lift above, both sides, compared file by file (sha1 of all 102 files in `sa/gen`): identical. Against the launcher's nightly-336 build on this PC (09:33 today), which then ran about 22 minutes of play (80,813 frames presented, Windows 11, RX 6700 XT, AMD 26.10.1), 101 of the 102 files are the same; the other is `a64_fpx.h`, changed on main by #1002 (`always_inline` helpers), not here. - `tests/test_walk.py` fails if the walk doesn't stop at another entry, leaves a conditional branch's target unvisited, or shares the entry of a word that classifies as a branch; `tests/test_dead_flags.py` fails if the shortcut looks at the first op only or at the flags an op reads (each checked by hand). - `python -I -B tests/run_all.py` on Windows: 570 passed, 23 failed, 86 skipped; main @ 71b1edd8: 569 passed, 22 failed. The failures are the same 22 (`test_vk_occlusion_queries`, `test_crash_dialog`, `test_linux_preflight`, `test_job_queue`, `test_make_game_cache`, `test_bug_report_defaults`, `test_run_all_changed`, `test_tested_configurations`, `test_portable_builder_home`, `test_pending_guest_import`, `test_missing_nup`, `test_guest_imported`, `test_walk_key`, `test_pads_after_menu`, `test_auto_handheld`, `test_failed_compile_keeps_objects`, `test_portable_builder_startup`, `test_bug_report`, `test_crt_options`, `test_audio_output_devices`, `test_hardware_report`, `test_dlss_feature_size`) plus `test_longshot_ctl` here, which is flaky on main too (`test_the_session_follows_a_relaunch`: run alone twice each, it failed once on main and passed twice here). The two extra passes are the new checks. **Not tested:** a lift on Linux or macOS (the walk and dead_flags run there too; the forked emit's worker count is gated at 2 GB each, so the memory saved matters less there), and the lift inside a whole `make_game.py` build. **Must be tested:** - Linux, any GPU (I'm on Windows): a lift of the same game on main and on this PR (`python -I nx2/lift.py --standalone --write --work NEW_FOLDER`, or a `make_game.py` build of each), expecting the same sha1 for every file of the work folder's `sa/gen` (Test Farm: @Beanstalk linux, the lift on main and on this PR, comparing the files of sa/gen) ## Risks **What could break:** the lift's discovery or emit, where it would show as a failed lift or C that differs from main's. The walk relies on a plain op's classification not depending on its pc (true of the kit's and `nx2/insn.py`'s classify; `tests/test_lift_lookups.py` from #1116 checks it). More emit workers on Windows means more memory in use during the emit; free memory stayed above 1.6 GB on this PC at 5 workers, where main at 3 went down to 0.7 GB. **Turning it off:** revert the commits. **Compatibility:** the lift key changes (translator files changed), so the next update translates the game once. The C is the same as before, so the compile finds the same object keys; shader caches are not touched. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The kit's walk stores every instruction as its own (kind, word) tuple: 13.1 million for OoT, of which 12.7
million plain ops of 1.16 million distinct words. The lift's process held about 1.2 GB of duplicates
through the emit, and Windows starts one emit process per 0.75 GB free, so a 16 GB PC got 2-3 where it
now gets 5. nx2/walk.py is the kit's walk with the image's lookups inline and one shared tuple per plain
op's word (kept after the fact, the memory stays with Python's allocator, so it is done as the walk makes
them). tests/test_walk.py compares it with the kit's walk over a made-up image and pins the kit's tree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
perf(lift): the emit asks dead_flags only of functions that write a flag, and reads A64_FASTFP_MIN once a function
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 9s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Workflow lint (actionlint) (pull_request) Successful in 10s
Third-party parts / As their notes say (pull_request) Successful in 15s
PR description / Description follows the template (pull_request_target) Successful in 6s
beanstalk/linux 1/1 pass
beanstalk/approval approved by futondestroyer, madebyjordan (double-reviewed)
68f5e131e9
The kit's dead_flags (which flag stores nothing reads) can only find a dead store where an instruction
writes a flag: 58% of OoT's functions have none, and its pass and fixpoint over them returned {} after
all that work (nx2/dead_flags.py answers them at once). ff_region read A64_FASTFP_MIN from the
environment for each of 3.8 million runs; emit_function now reads it once and passes it on. The lifted C
is the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, RX 6700 XT, AMD 26.10.1, Ryzen 5 5600: this PR changes no byte of the lifted C. It is identical to main @ 71b1edd8's (sha1 of all 102 files of sa/gen, two lifts each side), and 101 of those 102 files are the same as the launcher's nightly-336 build on this PC from 09:33 today, which then ran about 22 minutes of play (80,813 frames presented) with no problem; the other file, a64_fpx.h, differs by main's own #1002, not by this PR.

Tested in game: Windows 11, RX 6700 XT, AMD 26.10.1, Ryzen 5 5600: this PR changes no byte of the lifted C. It is identical to main @ 71b1edd8's (sha1 of all 102 files of sa/gen, two lifts each side), and 101 of those 102 files are the same as the launcher's nightly-336 build on this PC from 09:33 today, which then ran about 22 minutes of play (80,813 frames presented) with no problem; the other file, a64_fpx.h, differs by main's own #1002, not by this PR.
madebyjordan changed title from WIP: perf(lift): 1.2 GB less in a Windows lift's own process, so more emit workers start: about a fifth faster, the same C to perf(lift): 1.2 GB less in a Windows lift's own process, so more emit workers start: about a fifth faster, the same C 2026-11-16 12:35:59 +00:00
Author
Member

@Beanstalk linux: translate the game on main and on this PR (python -I nx2/lift.py --standalone --write --work NEW_FOLDER, a new folder for each, or a make_game.py build of each), then compare the sha1 of every file in each work folder's sa/gen. Expected: every file identical, and the PR's lift no slower than main's (the lift: lines of each log).

@Beanstalk linux: translate the game on main and on this PR (python -I nx2/lift.py --standalone --write --work NEW_FOLDER, a new folder for each, or a make_game.py build of each), then compare the sha1 of every file in each work folder's sa/gen. Expected: every file identical, and the PR's lift no slower than main's (the lift: lines of each log).
Member

@madebyjordan approval of 68f5e13 recorded. This diff touches sensitive paths, so a second member of BigBeans must approve it too.

@madebyjordan approval of `68f5e13` recorded. This diff touches sensitive paths, so a second member of `BigBeans` must approve it too.
Member

Beanstalk test farm

Commit 68f5e13 · tier double-reviewed · approved by futondestroyer, madebyjordan · dashboard

What will be tested · AI plan (gpt-6.1-terra)

On Linux, this plan builds main and the PR, then runs a short gameplay smoke test in Kokiri Forest and Hyrule Field, taking comparison pictures and measuring frame time. It takes about 13 minutes per tester, excluding build time; crashes, picture differences or a frame-time regression fail the plan. Farm probes cannot compare generated C files or measure lift-stage timing, so this plan does not establish the requested lift-output equivalence or speed.

  • Where: linux (1 report).
  • linux-gameplay: from a new save, then take the picture kokiri to compare with main, teleport to Hyrule Field, take the picture field to compare with main, measure field for 20 s (after 5 s warm-up); 1 run on each side.
  • Measured: crashes, frame times, stutters and hitches.
  • The PR fails if: it crashes; or a picture differs from main by more than 5%; or frame time (p99) is more than 15% above main.
  • Time: about 13 min of game runs per tester (2 game starts), plus the two builds.

Done. Run 2: the farm's reports were cleared after its Windows and Linux fixes: started again. Comment @Beanstalk to run it again.

This diff touches sensitive paths, so it needs two members of BigBeans: nx2/dead_flags.py, nx2/fastfp.py, nx2/lift.py, nx2/walk.py

Target Reports Crash Frame p99 (ms) vs main VRAM peak (MB) vs main Result
linux · 1: linux+amd+radv+dgpu AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7 1/1 1 none 1076.8 vs 1081.0 (−0%) — pass

Measurements · linux

Verdict: pass on linux (1/1 report): no rule failed and no PR run crashed.

Hardware: 1: linux+amd+radv+dgpu AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7 AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM
Scene: linux-gameplay, from a new save; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); linux-gameplay: 1 game start a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 71b1edd After: this PR @ 68f5e13
linux-gameplay · field · frame time (p99) (ms) 1,081 1,077 (−0%)

Flags and settings

None: the plan varied no setting, switch or build option.

Markdown for the PR description
## Measurements

**Verdict:** pass on linux (1/1 report): no rule failed and no PR run crashed.

Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM`  
Scene: linux-gameplay, from a new save; each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); linux-gameplay: 1 game start a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 1 report  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 71b1edd | After: this PR @ 68f5e13 |
|---|---|---|
| linux-gameplay · field · frame time (p99) (ms) | 1,081 | 1,077 (−0%) |

### Flags and settings

None: the plan varied no setting, switch or build option.
<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `68f5e13` · tier **double-reviewed** · approved by futondestroyer, madebyjordan · [dashboard](https://beanstalk.magicbean.dev/prs/1128) **What will be tested** · AI plan (`gpt-6.1-terra`) On Linux, this plan builds main and the PR, then runs a short gameplay smoke test in Kokiri Forest and Hyrule Field, taking comparison pictures and measuring frame time. It takes about 13 minutes per tester, excluding build time; crashes, picture differences or a frame-time regression fail the plan. Farm probes cannot compare generated C files or measure lift-stage timing, so this plan does not establish the requested lift-output equivalence or speed. - **Where:** linux (1 report). - **linux-gameplay:** from a new save, then take the picture kokiri to compare with main, teleport to Hyrule Field, take the picture field to compare with main, measure field for 20 s (after 5 s warm-up); 1 run on each side. - **Measured:** crashes, frame times, stutters and hitches. - **The PR fails if:** it crashes; or a picture differs from main by more than 5%; or frame time (p99) is more than 15% above main. - **Time:** about 13 min of game runs per tester (2 game starts), plus the two builds. Done. Run 2: the farm's reports were cleared after its Windows and Linux fixes: started again. Comment `@Beanstalk` to run it again. This diff touches sensitive paths, so it needs two members of `BigBeans`: `nx2/dead_flags.py`, `nx2/fastfp.py`, `nx2/lift.py`, `nx2/walk.py` | Target | Reports | Crash | Frame p99 (ms) vs main | VRAM peak (MB) vs main | Result | | --- | --- | --- | --- | --- | --- | | linux · 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` | 1/1 [1](https://beanstalk.magicbean.dev/reports/rp_2237e70222264ae0) | none | 1076.8 vs 1081.0 (−0%) | — | pass | #### Measurements · linux **Verdict:** pass on linux (1/1 report): no rule failed and no PR run crashed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM` Scene: linux-gameplay, from a new save; each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); linux-gameplay: 1 game start a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 71b1edd | After: this PR @ 68f5e13 | |---|---|---| | linux-gameplay · field · frame time (p99) (ms) | 1,081 | 1,077 (−0%) | ### Flags and settings None: the plan varied no setting, switch or build option. <details><summary>Markdown for the PR description</summary> ```markdown ## Measurements **Verdict:** pass on linux (1/1 report): no rule failed and no PR run crashed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM` Scene: linux-gameplay, from a new save; each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); linux-gameplay: 1 game start a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 71b1edd | After: this PR @ 68f5e13 | |---|---|---| | linux-gameplay · field · frame time (p99) (ms) | 1,081 | 1,077 (−0%) | ### Flags and settings None: the plan varied no setting, switch or build option. ``` </details>
futondestroyer left a comment

Reviewed head 68f5e131 against main 71b1edd8.

No blocking code finding. The replacement walk preserves the kit's traversal order, entry boundaries, labels and jump-table handling. It shares only immutable plain-op entries; PC-relative control flow is still classified per address. Its fast image lookup is reached only for aligned code addresses, and the kit provenance pin makes a later kit refresh require reconsideration. The dead-flags shortcut uses the same text lookup, UNHANDLED exclusion and flag-write mask as the kit; functions with a flag writer retain the original analysis. Reading A64_FASTFP_MIN once per function preserves the configured threshold.

Independent Windows game-free validation: 13 focused checks passed, 0 failed, 0 skipped (walk, 3,000-function dead-flags differential, fastfp regions/override/FMA, image lookups, workers, lift cache/store, cleanup, entry and chunk boundaries). Diff whitespace check passed; third_party is unchanged. I did not rerun the entire suite or perform a real-game lift; the PR documents its full-suite failures and baseline comparison.

Ready for Linux farm validation, not a claim that Linux output equivalence has already been established. Please compare builds of the same base/head on Linux, checking lift/build success and recording lift-stage timings. The requested byte-for-byte equality of every sa/gen file remains an explicit requirement: the documented farm probes do not expose a generated-file equality metric, so a normal build/game pass alone must not be presented as that proof. Generated C and other game-derived files must remain on the tester's PC; report only equality verdict/counts and timings.

Farm authorization will be a separate SHA-pinned command; merge approval is deferred pending the outstanding Linux evidence.

Reviewed head `68f5e131` against main `71b1edd8`. No blocking code finding. The replacement walk preserves the kit's traversal order, entry boundaries, labels and jump-table handling. It shares only immutable plain-op entries; PC-relative control flow is still classified per address. Its fast image lookup is reached only for aligned code addresses, and the kit provenance pin makes a later kit refresh require reconsideration. The dead-flags shortcut uses the same text lookup, UNHANDLED exclusion and flag-write mask as the kit; functions with a flag writer retain the original analysis. Reading A64_FASTFP_MIN once per function preserves the configured threshold. Independent Windows game-free validation: 13 focused checks passed, 0 failed, 0 skipped (walk, 3,000-function dead-flags differential, fastfp regions/override/FMA, image lookups, workers, lift cache/store, cleanup, entry and chunk boundaries). Diff whitespace check passed; third_party is unchanged. I did not rerun the entire suite or perform a real-game lift; the PR documents its full-suite failures and baseline comparison. Ready for Linux farm validation, not a claim that Linux output equivalence has already been established. Please compare builds of the same base/head on Linux, checking lift/build success and recording lift-stage timings. The requested byte-for-byte equality of every sa/gen file remains an explicit requirement: the documented farm probes do not expose a generated-file equality metric, so a normal build/game pass alone must not be presented as that proof. Generated C and other game-derived files must remain on the tester's PC; report only equality verdict/counts and timings. Farm authorization will be a separate SHA-pinned command; merge approval is deferred pending the outstanding Linux evidence.
Member

/beanstalk 68f5e131e9

/beanstalk 68f5e131e9f242c291a708f8747b541e520bb7c3
HumanBean deleted branch perf/lift-memory 2026-11-16 16:43:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1128
No description provided.