Repository navigation
perf: copy bitmaps a word at a time in pre_selection_scatter - #25494
Open
abokhalill wants to merge 1 commit into
Open
abokhalill wants to merge 1 commit into
abokhalill wants to merge 1 commit into
Conversation
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
Contributor
|
@abokhalill |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #25494 +/- ##
==========================================
- Coverage 82.37% 82.37% -0.01%
==========================================
Files 1138 1138
Lines 433506 433529 +23
Branches 433506 433529 +23
==========================================
+ Hits 357102 357107 +5
- Misses 54850 54862 +12
- Partials 21554 21560 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Slicing the RHS array per selected run clones and drops an Arc on every iteration, and iterating the slice sets one bit per row while both sides are already bit-packed. Borrow the RHS buffers once and copy each run with append_packed_range. Only build a validity bitmap when the RHS has nulls, so a null-free result does not pay a second pass per run. TPC-H SF30 on 24 threads: q6 -8.3%, q12 -4.1%, q19 -2.0%, others within noise.
abokhalill
force-pushed
the
perf-pre-selection-scatter-bulk-copy
branch
from
October 7, 2026 17:57
b1a7913 to
7a60002
Compare
Author
|
@kosiew done. the speedups are actually even more prominent now! |
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.
Which issue does this PR close?
Rationale for this change
pre_selection_scatterputs the short-circuited RHS result back at full batch length. For each run of selected rows it slices the RHS and appends oneOption<bool>at a time, even though both sides are bit-packed, and everysliceclones and drops anArc.Since #25771,
ANDchains of cheap comparisons no longer reach this function, so TPC-H is unchanged. It still runs forOR, and forANDwith a conjunct that is not cheap.TPC-H SF30
lineitem, 24 threads,l_quantity > K or l_discount > 0.05, by share of rows that reach the RHS:l_quantity < K and l_comment like '%special%'is 1-2% faster. The 22 TPC-H queries are within noise.What changes are included in this PR?
Borrow the RHS buffers once, copy each run with
append_packed_range, and only build a validity bitmap when the RHS has nulls.Are these changes tested?
Yes, by the existing tests, including
test_pre_selection_scatter.Are there any user-facing changes?
No.