Repository navigation
DirectStorage: use SIMD for zlib checksums - #661
Conversation
A retail title streams thousands of 64 KiB zlib blocks during startup. Enable the existing checksum backend to validate them using SIMD on supported CPUs. Assisted-by: Codex (GPT-6.2 Astra)
|
License check + NVIDIA RTX 5080 test run on ReviewLooks clean:
Tested
Not tested
AI use: licence verification and test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above. |
|
Tested — native Windows, AMD CPU / RDNA2
Not tested: the 5.7 % timing claim (no retail archive or benchmark here), release AI use: OpenCode with DeepSeek V4.1 Flash 1017 ran the tests and drafted this report. |
|
Test run of Tested
Review: One Cargo feature; Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
The retail title issues thousands of 64 KiB zlib reads during startup. DirectStorage already verifies the Adler-32 checksum on each inflated block. This enables the SIMD checksum implementation in the same version of
miniz_oxide.What is in it
simd-adler320.3.10 is MIT licensed. The decompressor, output limits and checksum validation stay the same.Tested
decompress_to_vec_zlib_with_limitcall that DirectStorage uses. Median of 10 runs per build, alternating order, with input in memory and 48 passes per run. On 236 distinct 64 KiB blocks from eight retail title archives, the default took 1,036.5 ms and SIMD took 976.9 ms (5.7% less time). On 128 synthetic blocks, it was 191.3 ms and 147.2 ms.cargo build --locked --workspacepassed.cargo test --locked --workspace -- --test-threads=4reported 690 passed, 0 failed, 41 ignored. Two GPU tests skipped internally for lack of wave64 (gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware).Synthetic workload for reproducing the timing
Generate the inputs once with Python 3. Use
miniz_oxide0.9.1 in a release build. Time 48 passes over the 128 streams with the default features, then withfeatures = ["simd"]. Warm each build first and keep file I/O outside the timed loop.Regression run
Main
PR
Not tested
AI use