jhorstmann commented on a change in pull request #8736:
URL: https://github.com/apache/arrow/pull/8736#discussion_r528247968
##########
File path: rust/arrow/src/array/array.rs
##########
@@ -157,7 +157,7 @@ pub trait Array: fmt::Debug + Send + Sync + JsonEqual {
/// assert_eq!(array.is_null(1), true);
/// ```
fn is_null(&self, index: usize) -> bool {
- self.data().is_null(index)
+ self.data_ref().is_null(index)
Review comment:
This alone improved the performance a lot, but directly using ArrayData
was even better. Should also improve some other kernels.
I think the `data` method is a real performance foot-gun and would be in
favor of removing it completely. That makes it obvious to every user whether an
`Arc` gets cloned. The cloning itself might not be a problem, but I think it
sometimes prohibits other compiler optimizations.
----------------------------------------------------------------
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]