cetra3 commented on code in PR #9407:
URL: https://github.com/apache/arrow-rs/pull/9407#discussion_r2802786690
##########
arrow-ord/src/sort.rs:
##########
@@ -216,27 +218,20 @@ fn partition_validity_scan(
let mut valid = Vec::with_capacity(len - null_count);
let mut nulls = Vec::with_capacity(null_count);
- unsafe {
- // 1) Write valid indices (bits == 1)
- let valid_slice = valid.spare_capacity_mut();
- for (i, idx) in bitmap.inner().set_indices_u32().enumerate() {
- valid_slice[i].write(idx);
- }
+ let mut cur_idx = 0u32;
- // 2) Write null indices by inverting
- let inv_buf = !bitmap.inner();
Review Comment:
I think this is where most of the saving comes in. Recreating the bitmap
with inverse is another pass over it, so we have to read it twice.
--
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]