jhorstmann commented on a change in pull request #8092:
URL: https://github.com/apache/arrow/pull/8092#discussion_r483140684



##########
File path: rust/arrow/src/array/array.rs
##########
@@ -195,7 +196,8 @@ pub trait Array: fmt::Debug + Send + Sync + ArrayEqual + 
JsonEqual {
     /// assert_eq!(array.is_valid(1), false);
     /// ```
     fn is_valid(&self, index: usize) -> bool {
-        self.data().is_valid(self.data().offset() + index)
+        let data = self.data_ref();

Review comment:
       Noticed these while benchmarking, avoiding the clone in `data()` doubled 
the performance when sorting a bigger dataset by multiple columns. This should 
also improve several other kernels.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to