ARROW-10682: [Rust] Improve sort kernel performance by enabling inlining of is_valid calls#8736
Conversation
…ing of is_valid calls
| /// ``` | ||
| fn is_null(&self, index: usize) -> bool { | ||
| self.data().is_null(index) | ||
| self.data_ref().is_null(index) |
There was a problem hiding this 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.
There was a problem hiding this comment.
FWIW, I agree with you: require an explicit .clone from the user (also broadly speaking, not just for .data() in particular. We should audit the code base for similar occurrences.
There was a problem hiding this comment.
I created https://issues.apache.org/jira/browse/ARROW-10683 about removing data method.
|
@jorgecarleitao I see you're currently also working on sorting, this might be of interest to you. |
|
👍 thank you @jhorstmann and @jorgecarleitao |
Benchmark results on an aws t3 instance (cascadelake):