haohuaijin opened a new pull request, #11639: URL: https://github.com/apache/arrow-rs/pull/11639
# Which issue does this PR close? N/A # Rationale for this change Trimming a bitmap-backed row selection scans trailing unset bits byte by byte. Long tails of skipped rows add unnecessary selection setup overhead. # What changes are included in this PR? Scan backwards through 64-bit words using `BitChunks`, checking the masked remainder first. Use `leading_zeros` to locate the final selected row. This reuses existing handling of bit offsets and padding while preserving the fast path for selections that need no trimming. The implementation and tests were prepared with AI assistance. # Are these changes tested? Add deterministic tests covering word boundaries, long zero tails, non-zero bit offsets, and set bits outside the logical slice. Existing randomized trim equivalence tests also pass. # Are there any significant user-facing changes? No. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
