perf: fuse compaction block prefixes - #18
Merged
Merged
Conversation
SamJSui
marked this pull request as ready for review
August 9, 2026 02:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
u32andKeyValuecompactionWhy
At 100M items, compaction spent about 1.35 ms traversing the 400 MB offsets buffer solely to add block prefixes. Scatter immediately reread those values. The fused path removes that pass (800 MB of logical read/write traffic) while preserving standalone scan output.
Massively 0.96 results
Speedup is Massively time divided by wgpu-primitives time.
Versus PR #17, compaction improves 19.9%-27.3%. Fresh exact-current 10M matrices also retain Jetson leads of 8.48x-8.55x for bounded sort, 4.53x-4.55x for full-width sort, and 1.48x-1.53x for scan. The complete fresh RTX matrix wins all 12 sort/scan/compaction rows by 1.12x-19.71x.
Full method and process medians:
benchmarks/2026-08-08-fused-compaction-prefix.md.Validation
cargo fmt --all --checkcargo test --lib --tests(64 passed)cargo clippy --all-targets --all-features -- -D warningscargo doc --no-depscargo package --allow-dirtySUBGROUPdisabled at 4,097 itemsnvfancontrolactive