alamb commented on code in PR #1048:
URL: https://github.com/apache/arrow-rs/pull/1048#discussion_r889517911
##########
arrow/src/compute/kernels/sort.rs:
##########
@@ -151,8 +152,16 @@ fn partition_validity(array: &ArrayRef) -> (Vec<u32>,
Vec<u32>) {
// faster path
0 => ((0..(array.len() as u32)).collect(), vec![]),
_ => {
- let indices = 0..(array.len() as u32);
- indices.partition(|index| array.is_valid(*index as usize))
+ let validity = array.data().null_buffer().unwrap();
Review Comment:
Maybe we can add a `#inline` or `#[inline(always)]` annotation to the
various locations?
There doesn't seem to be any such annotations yet
https://sourcegraph.com/github.com/apache/arrow-rs/-/blob/arrow/src/array/data.rs?L420:12&subtree=true
https://sourcegraph.com/github.com/apache/arrow-rs/-/blob/arrow/src/array/array.rs?L178:26&subtree=true
--
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]