Use chunks_exact for has_true/has_false to enable compiler unrolling#9570
Merged
Dandandan merged 1 commit intoapache:mainfrom Mar 18, 2026
Merged
Use chunks_exact for has_true/has_false to enable compiler unrolling#9570Dandandan merged 1 commit intoapache:mainfrom
Dandandan merged 1 commit intoapache:mainfrom
Conversation
Replace `.chunks(64)` with `.chunks_exact(16)` in `has_true()` and `has_false()`. With `chunks_exact`, the compiler can fully unroll the inner fold (guaranteed size, no inner branch/loop), allowing a smaller block size for more frequent short-circuit exits without regressing the full-scan path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
run benchmark boolean_array |
Contributor
Author
|
cc @Dandandan |
|
🤖 Arrow criterion benchmark running (GKE) | trigger |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Details
Resource Usagebase (merge-base)
branch
|
Dandandan
approved these changes
Mar 18, 2026
Contributor
|
Wooohoo! 🚀 |
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
.chunks(64)with.chunks_exact(16)inhas_true()andhas_false()as suggested in Add has_true() and has_false() to BooleanArray #9511 (comment)chunks_exact, the compiler can fully unroll the inner fold (guaranteed size, no inner branch/loop), allowing a smaller block size for more frequent short-circuit exits without regressing the full-scan pathBenchmark results (block size 16 vs baseline)
Test plan
test_hastests passrun benchmarks boolean_array
@Dandandan Would appreciate your review!
🤖 Generated with Claude Code