Speed: --bench with checksums, BC decode in bands (SIX-99) #206
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!206
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/206/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-24 20:41 UTC · original
holdmysocks:six-99-speed→master· +472 −39 · 4 files · 3 commits · merged 2026-11-24 21:38 UTCLinear: SIX-99.
What changes
sixng --bench(first commit). Times four things on the installed game data and prints a checksum of every result, so a speed change can be shown not to change the output:It needs the archives indexed and writes nothing to the work dir.
--bench-only,--bench-index,--bench-mb,--bench-at-mb,--bench-count,--bench-modelsand--bench-outnarrow or move it. The subcommand is now optional so thatsixng --benchworks on its own; without either, the CLI prints an error as before.BC1 to BC7 decode in bands (second commit).
texture::to_rgbasplits a block-compressed image into bands of block rows and decodes one band per core. Blocks do not depend on each other, so the bytes are the same. BC6H and BC7 split from 512 x 512 pixels, the faster formats from 2048 x 2048: smaller images stay on one core, because handing a few milliseconds of work to busy cores costs more than it saves.bc6h.rsand the BCPack decoders are untouched. A new test checks that every band split gives the bytes of a single pass, for all eight formats and for sizes that are not whole blocks.Measured
6 threads, the best of several runs, before and after alternated. The PC was fully loaded by other work the whole time, so identical runs differed by 2x to 4x; read the times as rough.
514ad9522fb6bdf46d8beeb1d11cc8f5879ba0724b8fe1e8levels.rpf0be5f68d3c58589e8cfabd593b7d454668c2e27fa4e23965Only the first three rows are a real change: a single large BC7 texture decodes about five times faster on six threads. The rest is the same code and the differences are noise. Every checksum was identical in every run of every build.
Tried, not in this PR
flate2already uses zlib-rs (since the first commit). Built with the other pure-Rust backend for comparison: the scan of the same 1024 MB took 2.32 s against 1.30 s, with the same checksums. Nothing to change.Checks
cargo test -p sixng-core -p sixng-cli: 179 passed, 1 ignored.sixng-guiwas not rebuilt; it callsto_rgbathrough the same signature.