perf(host): the game's zstd decodes run on the host's libzstd by default (HOS_NATIVE_ZSTD=0: as lifted code) #1402

Merged
HumanBean merged 1 commit from GummiNaomi/Longshot:perf/native-zstd-default into main 2026-11-17 16:59:21 +00:00
Member

Type: perf · Risk: medium · Tested on: Windows 11, RTX 4070 SUPER (NVIDIA 617.42), Ryzen 9 9950X3D · Needs: Linux; a Steam Deck or another CPU of four cores; a played session

Why

Every area load unpacks the game's .zs files with the game's own copy of zstd, which runs as lifted code. In a profile of the walk from Castle Town into Hyrule Field (HOS_PROFILE=1), in the frames around the area change the two kinds of loader thread (ParallelDecompThread, the ARes_Loading threads) spend 10 to 33 % of their samples in one lifted function they share, f_801102e0, which I take to be that decoder's inner loop (not checked further), and a stream decode holds one of the six virtual cores for as long as it runs.

Both decodes have had a path through the host's own libzstd for a while: HOS_NATIVE_ZSTD for the streams and HOS_NATIVE_ZSTD_FRAMES for the resource loaders' whole buffers (#155). They are opt-in. They were measured when they were written on a save's load in Hyrule Field, which did not get shorter (26.2-29.2 s against 25.9-28.9 s, docs/tested-configurations.md), so there was no reason to turn them on.

Measured over many area loads instead of one, they do help: the loading screens are about a tenth shorter. So this turns them on by default.

What changed

Both switches are on unless they say off.

  • host (host/hos_zstd.c): zs_wanted(name) reads a switch: unset or empty is on, 0, false, off or no is off. zs_mode() and zf_mode() ask it. HOS_NATIVE_ZSTD unset is what =1 was (the stream decoded by libzstd, the thread's virtual core given up meanwhile); =2 keeps the core, as before; =0 runs the game's own decoder as lifted code. HOS_NATIVE_ZSTD_FRAMES=0 does the same for the whole-buffer decode. Nothing else in the file changes: the same calls into libzstd, the same fallbacks to the lifted code (a misaligned workspace, a dictionary libzstd does not take, a raw dictionary, another frame format), the same log lines.
  • tests: tests/test_native_zstd.py runs the stream decode and the whole-buffer decode with the switches unset and empty as well (done on the host, the output the original, the core given up and taken back as with =1); its "switch off" cases already set 0.
  • docs: the switches' row in docs/development.md; six files under docs/tested/.

Measurements

Verdict: the loading screens of an area change are about a tenth shorter: 5.21 and 5.63 s a teleport with this change's default against 6.38 and 5.82 s with both switches at 0 (the same build, in turn). Two earlier pairs on main with the switches set by hand agree: 5.56 and 5.51 s against 6.28 and 6.28 s. Over the eight tours no "off" tour is as short as any "on" tour, the closest by 0.19 s. Keeping the core (HOS_NATIVE_ZSTD=2) is no different from giving it up here (5.54 and 5.27 s). The long frames around an area change do not move, and nothing else was seen to.

Hardware: Windows 11 Pro 26200, RTX 4070 SUPER 12 GB (NVIDIA 617.42), Ryzen 9 9950X3D (16 cores, SMT off), 32 GB
Scene: the repository's kokiri-start save, then the debug teleport round the Market, Hyrule Field, Kakariko, Kokiri Forest, the Lost Woods and Zora's River, 20 s to arrive and 12 s more in each, for 10 minutes (36 to 38 teleports); headless, scripts/longshot_ctl.py launch --profile test, uncapped (HOS_FPS_MAX=1000)
Method: one build, the three settings in turn, twice; from the frame trace (RX_VK_FRAME_TRACE=1, every side) from 600 frames after the save's arrival to the end: the time on loading screens is the sum of the frames with under 2 ms of draws (draw_ms), divided by the tour's teleports; the long frames are the others of 50 ms or more
Baseline: this PR with HOS_NATIVE_ZSTD=0 and HOS_NATIVE_ZSTD_FRAMES=0, which is main's default (the game's decoder as lifted code). The build is main 544229a2 with this change (in the working tree when the tours ran, committed after as ea7ed5b5 unchanged) and the link fix our MSVC-target build needs (#1379)
How to reproduce: HOS_NATIVE_ZSTD=0 and HOS_NATIVE_ZSTD_FRAMES=0 against no switch, a tour of teleports with the control bridge (longshot_ctl.py teleport <map> --arrive 20); the log's zstd: the game's ... decode on the host's libzstd lines say what runs where

Before, HOS_NATIVE_ZSTD=0 HOS_NATIVE_ZSTD_FRAMES=0: this PR @ ea7ed5b5 (two tours) After: this PR @ ea7ed5b5 (two tours) After, HOS_NATIVE_ZSTD=2: this PR @ ea7ed5b5 (two tours)
Loading screens, a teleport 6.38, 5.82 s 5.21, 5.63 s 5.54, 5.27 s
mean of the two 6.10 s 5.42 s 5.41 s
Teleports in the 10 minutes 36, 37 37, 38 38, 37
Long frames (50 ms or more), a teleport 487, 470 ms 460, 470 ms 466, 465 ms
Very long frames (100 ms or more) in the tour 60, 56 53, 52 64, 60
The tour's worst frame 300, 278 ms 279, 279 ms 239, 328 ms
Decodes left to the lifted code (the log's runs lifted lines) all none none
Errors, device loss none none none

The two earlier pairs, on main 544229a2 with #1359 and the switches set by hand (=1 and FRAMES=1 against unset, the same tour):

Before, no switch: main @ 544229a2 with #1359 (two tours) After, HOS_NATIVE_ZSTD=1 HOS_NATIVE_ZSTD_FRAMES=1: main @ 544229a2 with #1359 (two tours)
Loading screens, a teleport 6.28, 6.28 s 5.56, 5.51 s
Long frames (50 ms or more), a teleport 449, 456 ms 399, 451 ms
Very long frames (100 ms or more) in the tour 66, 53 48, 59

The picture, both ways: one full-size shot in each of the six areas with the switches unset and with both set, compared by eye by two people: everything is drawn on both, and what differs is what two runs differ by (the pose, the clouds, the camera still settling after the save's load).

Flags and settings

No new switch; two existing ones change their default.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
HOS_NATIVE_ZSTD the game's zstd stream decode on the host's libzstd off (unset); 1 on, the core given up; 2 on, the core kept on (unset or 1); 2 the core kept; 0 the lifted code loading screens about a tenth shorter, with the next one helps on a 9950X3D with an RTX 4070 SUPER on Windows; untested on Linux and on a CPU of four cores on
HOS_NATIVE_ZSTD_FRAMES the resource loaders' whole-buffer zstd decode on the host's libzstd off (unset); set: on on (unset); 0 the lifted code as above; the two were not measured apart as above on

Testing

Tested: Windows 11, RTX 4070 SUPER, NVIDIA 617.42: the ten tours above (six on this change's build, four before it), 36 to 38 area loads each, no error or device loss in any log and no decode left to the lifted code with the switches on; the six areas' shots by eye. tests/test_native_zstd.py --cxx clang++ passes with this change, and with host/hos_zstd.c put back to main's its new cases fail ("the switch unset: a call was not done on the host"). python -I -B tests/run_all.py with clang here, this PR @ ea7ed5b5: 393 passed, 107 failed, 221 skipped; main @ 544229a2 in the same session: 393 passed, 107 failed, 221 skipped, the same 107 (this PC's toolchain: no gcc, Windows line endings, fixtures needing tools not installed).

Not tested: Linux; a CPU with few cores, where giving the core up or keeping it may matter (here it does not); a played session; the two switches apart; saves written and read back across the two decoders (they decode, they do not write; nothing was compared byte for byte beyond the unit test's outputs); a game file from a mod.

Must be tested:

  • Linux, any GPU: a tour of teleports (the Market, Hyrule Field, Kakariko, Kokiri Forest), with no switch and with HOS_NATIVE_ZSTD=0 HOS_NATIVE_ZSTD_FRAMES=0, expecting no crash, the same picture after each load, and loads no longer than with the switches at 0 (Test Farm: @Beanstalk linux, load times with and without the two switches at 0)
  • Windows, an AMD card: the same tour, expecting the same (Test Farm: @Beanstalk windows amd)
  • A Steam Deck: the same tour, expecting loads no longer than with the switches at 0, and no new hitch while the game streams in play (Test Farm: @Beanstalk steamdeck)

Risks

What could break: the two decoders are not the same code. host/hos_zstd.c lists where they differ: the bytes left just past the decoded output, and frames the format forbids, which libzstd 1.5.7 refuses and the game's older copy decodes (a block larger than the frame's window; a zstd compressor makes neither). A game file or a mod's file of that kind would fail to load where it loaded before. With the default the decoding thread also gives its virtual core up while it decodes, which changes which of the game's threads run when during a load; #155's own measurement had four frames over 100 ms in the first of four runs with =1, which these tours do not show (53 and 52 very long frames against 60 and 56), but that was another scene.

Turning it off: HOS_NATIVE_ZSTD=0 and HOS_NATIVE_ZSTD_FRAMES=0.

Compatibility: HOS_NATIVE_ZSTD=1, =2 and HOS_NATIVE_ZSTD_FRAMES=1 mean what they meant. Someone who had neither set gets the host's decoder where they had the lifted one.

Issues

None found for this (searched zstd, decompress, loading time, loading screen). #155 added the whole-buffer path and the measurements this builds on.

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.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • A file in docs/tested/ for each new measured run (format in docs/tested-configurations.md).
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Docs updated.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (Built on Windows for the MSVC target only.)

🤖 Generated with Claude Code

**Type:** perf · **Risk:** medium · **Tested on:** Windows 11, RTX 4070 SUPER (NVIDIA 617.42), Ryzen 9 9950X3D · **Needs:** Linux; a Steam Deck or another CPU of four cores; a played session ## Why Every area load unpacks the game's `.zs` files with the game's own copy of zstd, which runs as lifted code. In a profile of the walk from Castle Town into Hyrule Field (`HOS_PROFILE=1`), in the frames around the area change the two kinds of loader thread (ParallelDecompThread, the ARes_Loading threads) spend 10 to 33 % of their samples in one lifted function they share, `f_801102e0`, which I take to be that decoder's inner loop (not checked further), and a stream decode holds one of the six virtual cores for as long as it runs. Both decodes have had a path through the host's own libzstd for a while: `HOS_NATIVE_ZSTD` for the streams and `HOS_NATIVE_ZSTD_FRAMES` for the resource loaders' whole buffers (#155). They are opt-in. They were measured when they were written on a save's load in Hyrule Field, which did not get shorter (26.2-29.2 s against 25.9-28.9 s, `docs/tested-configurations.md`), so there was no reason to turn them on. Measured over many area loads instead of one, they do help: the loading screens are about a tenth shorter. So this turns them on by default. ## What changed Both switches are on unless they say off. - host (`host/hos_zstd.c`): `zs_wanted(name)` reads a switch: unset or empty is on, `0`, `false`, `off` or `no` is off. `zs_mode()` and `zf_mode()` ask it. `HOS_NATIVE_ZSTD` unset is what `=1` was (the stream decoded by libzstd, the thread's virtual core given up meanwhile); `=2` keeps the core, as before; `=0` runs the game's own decoder as lifted code. `HOS_NATIVE_ZSTD_FRAMES=0` does the same for the whole-buffer decode. Nothing else in the file changes: the same calls into libzstd, the same fallbacks to the lifted code (a misaligned workspace, a dictionary libzstd does not take, a raw dictionary, another frame format), the same log lines. - tests: `tests/test_native_zstd.py` runs the stream decode and the whole-buffer decode with the switches unset and empty as well (done on the host, the output the original, the core given up and taken back as with `=1`); its "switch off" cases already set `0`. - docs: the switches' row in `docs/development.md`; six files under `docs/tested/`. ## Measurements **Verdict:** the loading screens of an area change are about a tenth shorter: 5.21 and 5.63 s a teleport with this change's default against 6.38 and 5.82 s with both switches at 0 (the same build, in turn). Two earlier pairs on main with the switches set by hand agree: 5.56 and 5.51 s against 6.28 and 6.28 s. Over the eight tours no "off" tour is as short as any "on" tour, the closest by 0.19 s. Keeping the core (`HOS_NATIVE_ZSTD=2`) is no different from giving it up here (5.54 and 5.27 s). The long frames around an area change do not move, and nothing else was seen to. Hardware: Windows 11 Pro 26200, RTX 4070 SUPER 12 GB (NVIDIA 617.42), Ryzen 9 9950X3D (16 cores, SMT off), 32 GB Scene: the repository's `kokiri-start` save, then the debug teleport round the Market, Hyrule Field, Kakariko, Kokiri Forest, the Lost Woods and Zora's River, 20 s to arrive and 12 s more in each, for 10 minutes (36 to 38 teleports); headless, `scripts/longshot_ctl.py launch --profile test`, uncapped (`HOS_FPS_MAX=1000`) Method: one build, the three settings in turn, twice; from the frame trace (`RX_VK_FRAME_TRACE=1`, every side) from 600 frames after the save's arrival to the end: the time on loading screens is the sum of the frames with under 2 ms of draws (`draw_ms`), divided by the tour's teleports; the long frames are the others of 50 ms or more Baseline: this PR with `HOS_NATIVE_ZSTD=0` and `HOS_NATIVE_ZSTD_FRAMES=0`, which is main's default (the game's decoder as lifted code). The build is main 544229a2 with this change (in the working tree when the tours ran, committed after as ea7ed5b5 unchanged) and the link fix our MSVC-target build needs (#1379) How to reproduce: `HOS_NATIVE_ZSTD=0` and `HOS_NATIVE_ZSTD_FRAMES=0` against no switch, a tour of teleports with the control bridge (`longshot_ctl.py teleport <map> --arrive 20`); the log's `zstd: the game's ... decode on the host's libzstd` lines say what runs where | | Before, `HOS_NATIVE_ZSTD=0` `HOS_NATIVE_ZSTD_FRAMES=0`: this PR @ ea7ed5b5 (two tours) | After: this PR @ ea7ed5b5 (two tours) | After, `HOS_NATIVE_ZSTD=2`: this PR @ ea7ed5b5 (two tours) | |---|---|---|---| | Loading screens, a teleport | 6.38, 5.82 s | 5.21, 5.63 s | 5.54, 5.27 s | | mean of the two | 6.10 s | 5.42 s | 5.41 s | | Teleports in the 10 minutes | 36, 37 | 37, 38 | 38, 37 | | Long frames (50 ms or more), a teleport | 487, 470 ms | 460, 470 ms | 466, 465 ms | | Very long frames (100 ms or more) in the tour | 60, 56 | 53, 52 | 64, 60 | | The tour's worst frame | 300, 278 ms | 279, 279 ms | 239, 328 ms | | Decodes left to the lifted code (the log's `runs lifted` lines) | all | none | none | | Errors, device loss | none | none | none | The two earlier pairs, on main 544229a2 with #1359 and the switches set by hand (`=1` and `FRAMES=1` against unset, the same tour): | | Before, no switch: main @ 544229a2 with #1359 (two tours) | After, `HOS_NATIVE_ZSTD=1` `HOS_NATIVE_ZSTD_FRAMES=1`: main @ 544229a2 with #1359 (two tours) | |---|---|---| | Loading screens, a teleport | 6.28, 6.28 s | 5.56, 5.51 s | | Long frames (50 ms or more), a teleport | 449, 456 ms | 399, 451 ms | | Very long frames (100 ms or more) in the tour | 66, 53 | 48, 59 | The picture, both ways: one full-size shot in each of the six areas with the switches unset and with both set, compared by eye by two people: everything is drawn on both, and what differs is what two runs differ by (the pose, the clouds, the camera still settling after the save's load). ### Flags and settings No new switch; two existing ones change their default. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `HOS_NATIVE_ZSTD` | the game's zstd stream decode on the host's libzstd | off (unset); `1` on, the core given up; `2` on, the core kept | on (unset or `1`); `2` the core kept; `0` the lifted code | loading screens about a tenth shorter, with the next one | helps on a 9950X3D with an RTX 4070 SUPER on Windows; untested on Linux and on a CPU of four cores | on | | `HOS_NATIVE_ZSTD_FRAMES` | the resource loaders' whole-buffer zstd decode on the host's libzstd | off (unset); set: on | on (unset); `0` the lifted code | as above; the two were not measured apart | as above | on | ## Testing **Tested:** Windows 11, RTX 4070 SUPER, NVIDIA 617.42: the ten tours above (six on this change's build, four before it), 36 to 38 area loads each, no error or device loss in any log and no decode left to the lifted code with the switches on; the six areas' shots by eye. `tests/test_native_zstd.py --cxx clang++` passes with this change, and with `host/hos_zstd.c` put back to main's its new cases fail ("the switch unset: a call was not done on the host"). `python -I -B tests/run_all.py` with clang here, this PR @ ea7ed5b5: 393 passed, 107 failed, 221 skipped; main @ 544229a2 in the same session: 393 passed, 107 failed, 221 skipped, the same 107 (this PC's toolchain: no gcc, Windows line endings, fixtures needing tools not installed). **Not tested:** Linux; a CPU with few cores, where giving the core up or keeping it may matter (here it does not); a played session; the two switches apart; saves written and read back across the two decoders (they decode, they do not write; nothing was compared byte for byte beyond the unit test's outputs); a game file from a mod. **Must be tested:** - Linux, any GPU: a tour of teleports (the Market, Hyrule Field, Kakariko, Kokiri Forest), with no switch and with `HOS_NATIVE_ZSTD=0 HOS_NATIVE_ZSTD_FRAMES=0`, expecting no crash, the same picture after each load, and loads no longer than with the switches at 0 (Test Farm: @Beanstalk linux, load times with and without the two switches at 0) - Windows, an AMD card: the same tour, expecting the same (Test Farm: @Beanstalk windows amd) - A Steam Deck: the same tour, expecting loads no longer than with the switches at 0, and no new hitch while the game streams in play (Test Farm: @Beanstalk steamdeck) ## Risks **What could break:** the two decoders are not the same code. `host/hos_zstd.c` lists where they differ: the bytes left just past the decoded output, and frames the format forbids, which libzstd 1.5.7 refuses and the game's older copy decodes (a block larger than the frame's window; a zstd compressor makes neither). A game file or a mod's file of that kind would fail to load where it loaded before. With the default the decoding thread also gives its virtual core up while it decodes, which changes which of the game's threads run when during a load; #155's own measurement had four frames over 100 ms in the first of four runs with `=1`, which these tours do not show (53 and 52 very long frames against 60 and 56), but that was another scene. **Turning it off:** `HOS_NATIVE_ZSTD=0` and `HOS_NATIVE_ZSTD_FRAMES=0`. **Compatibility:** `HOS_NATIVE_ZSTD=1`, `=2` and `HOS_NATIVE_ZSTD_FRAMES=1` mean what they meant. Someone who had neither set gets the host's decoder where they had the lifted one. ## Issues None found for this (searched `zstd`, `decompress`, `loading time`, `loading screen`). #155 added the whole-buffer path and the measurements this builds on. ## 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. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] A file in `docs/tested/` for each new measured run (format in `docs/tested-configurations.md`). - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated. - [ ] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (Built on Windows for the MSVC target only.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
perf(host): the game's zstd decodes run on the host's libzstd by default (HOS_NATIVE_ZSTD=0: as lifted code)
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
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 17s
Guide screenshots / Guide images and local UI source review (pull_request) Successful in 17s
Website / Website on Cloudflare (pull_request_target) Has been skipped
Third-party parts / As their notes say (pull_request) Successful in 20s
PR description / Description follows the template (pull_request_target) Failing after 8s
ea7ed5b5cb
The game unpacks its files with its own copy of zstd, which runs as
lifted code: the stream decode on ParallelDecompThread and the resource
loaders' whole-buffer decode on the ARes_Loading threads. Both have a
path through the host's libzstd (HOS_NATIVE_ZSTD for the streams,
HOS_NATIVE_ZSTD_FRAMES for the whole buffers since #155), opt-in:
measured then on a save's load in Hyrule Field, which did not get
shorter.

On a tour of six areas by the debug teleport (10 minutes, 36-38
teleports, RTX 4070 SUPER, Ryzen 9 9950X3D) the loading screens take
6.38 and 5.82 s a teleport with both switches at 0 and 5.21 and 5.63 s
with this change's default; with HOS_NATIVE_ZSTD=2 (the core kept) 5.54
and 5.27 s. Two earlier pairs on main with the switches set by hand:
6.28 and 6.28 s against 5.56 and 5.51 s. The long frames around an area
change do not move (460-487 ms a teleport on every side), and no tour
has an error or a decode left to the lifted code.

Both switches are now on unless they say off: unset or empty is on
(HOS_NATIVE_ZSTD as 1, the core given up while a stream decodes); 0,
false, off or no runs the game's own decoder as before. zs_wanted reads
them. tests/test_native_zstd.py runs the stream and the whole-buffer
decode with the switches unset and empty too.

Assisted-by: Claude Mythos 5.2
Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Author
Member

@Beanstalk linux and windows amd: a tour of teleports (the Market, Hyrule Field, Kakariko, Kokiri Forest), once with this PR's default and once with HOS_NATIVE_ZSTD=0 HOS_NATIVE_ZSTD_FRAMES=0 (the game's own decoder as lifted code, as on main). Expecting: no crash; the same picture after each load on both; load times with the default no longer than with the two switches at 0 (here, on a 9950X3D on Windows: about a tenth shorter); and the log's zstd: the game's stream decode on the host's libzstd and zstd: the game's whole-buffer decode on the host's libzstd lines with the default, with no zstd: a decode runs lifted line after them.

🤖 Generated with Claude Code

@Beanstalk linux and windows amd: a tour of teleports (the Market, Hyrule Field, Kakariko, Kokiri Forest), once with this PR's default and once with `HOS_NATIVE_ZSTD=0 HOS_NATIVE_ZSTD_FRAMES=0` (the game's own decoder as lifted code, as on main). Expecting: no crash; the same picture after each load on both; load times with the default no longer than with the two switches at 0 (here, on a 9950X3D on Windows: about a tenth shorter); and the log's `zstd: the game's stream decode on the host's libzstd` and `zstd: the game's whole-buffer decode on the host's libzstd` lines with the default, with no `zstd: a decode runs lifted` line after them. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Member

@GummiNaomi the PR got a new push (ea7ed5b) after your comment. Review it and approve again.

@GummiNaomi the PR got a new push (`ea7ed5b`) after your comment. Review it and approve again.
GummiNaomi changed title from WIP: perf(host): the game's zstd decodes run on the host's libzstd by default (HOS_NATIVE_ZSTD=0: as lifted code) to perf(host): the game's zstd decodes run on the host's libzstd by default (HOS_NATIVE_ZSTD=0: as lifted code) 2026-11-17 16:00:53 +00:00
HumanBean deleted branch perf/native-zstd-default 2026-11-17 16:59:22 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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!1402
No description provided.