Specialize buffered descriptor comparisons by record width #39
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/linkoovosh--LinkoArts-build!39
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-39"
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?
@avt0m4t48 on GitHub · 2026-12-03 05:09 UTC · original
avt0m4t48:perf-specialize-buffered-descriptor-records→main· +29 −0 · 1 files · 1 commits · draftBuffered descriptor mirroring compares groups of 16 before revisiting changed records. For the view and sampler strides of 32 and 16 bytes, express both comparisons with fixed-width arrays. This lets the compiler generate fixed-width compares and stores. Keep the generic path for other strides, and preserve the complete-record boundary, updated mirror bytes and order of changed slot numbers.
Local verification
The extracted production
Copied::changespath matched an independent bytewise model across 31,500 calls per build. Tests include unaligned input, clipped ranges, partial records, and pre-existing entries in the output vector.Median elapsed times for 12 paired runs at each target, scanning 400,000 synthetic records on a Linux i7-7700HQ with Rust 1.98.1:
A separate benchmark with two 400,000-record packs and 40,000 changes found 1.16–1.28× speedups. When the compiler could already see both stride and slice length as constants, most of the gain disappeared. The tiny unchanged 24-byte generic fallback was 22–23% slower on v3 in that fixture. Buffered sync uses 16 and 32. The isolated MSVC object grew by about 1 KiB of
.texton each target.These results cover local CPU comparison and copy work. Page acquisition, native Windows timings, GPU behavior and gameplay FPS were outside the measurement.
The standalone GPU test targets and combined workspace test targets type-checked for Windows x86-64 MSVC with pure-Rust BLAKE3 and a metadata-only allocator declaration. The combined check covered both diagnostics settings. The staged asset policy passed.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.