alamb opened a new pull request, #10399:
URL: https://github.com/apache/arrow-rs/pull/10399

   # Which issue does this PR close?
   
   - Follow on to #10397 (part of #6430)
   
   # Rationale for this change
   
   `BooleanArray::take_n_true` is used in the parquet reader's limit pushdown 
path (`evaluate_predicate`) but has no benchmark coverage. #10397 changes its 
implementation to reuse the values allocation when the buffer is unshared, so a 
benchmark is needed to measure that change (and future ones).
   
   # What changes are included in this PR?
   
   A new `boolean_take_n_true` benchmark covering four cases on 8192-element 
arrays:
   
   - `shared`: the values buffer is shared, so the retained prefix must be 
copied
   - `unshared`: a fresh array per iteration, eligible for allocation reuse 
with #10397
   - `nulls shared`: exercises the null-skipping scan
   - `no truncation`: fewer than `n` set bits, returns `self` unchanged
   
   Baseline on `main` (before #10397): `shared` ~1.07µs, `unshared` ~1.13µs — 
with #10397 the `unshared` case is expected to improve as it avoids the copy.
   
   # Are these changes tested?
   
   The benchmark compiles and runs (`cargo bench --bench boolean_take_n_true -- 
--test`).
   
   # Are there any user-facing changes?
   
   No, benchmark only.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to