asubiotto commented on code in PR #9621:
URL: https://github.com/apache/arrow-rs/pull/9621#discussion_r3030476539
##########
arrow-ord/src/cmp.rs:
##########
@@ -701,10 +840,48 @@ pub fn compare_byte_view<T: ByteViewType>(
unsafe { GenericByteViewArray::compare_unchecked(left, left_idx, right,
right_idx) }
}
+/// Run-end encoding metadata for one side of a comparison. Holds a reference
+/// to the original REE array for deferred typed access to run_ends.
+struct ReeInfo<'a> {
+ array: &'a dyn Array,
+ offset: usize,
+ start_physical: usize,
+ len: usize,
+}
+
+impl ReeInfo<'_> {
+ /// Materialize run_ends as `Vec<usize>`.
+ fn run_ends_as_usize(&self) -> Vec<usize> {
Review Comment:
I tried a couple of approaches here but I think you need some form of type
erasure to avoid the monomorphization bloat which leads to per-element dynamic
dispatch that causes >15% regressions. Not sure there's a good answer here, I
might very well be missing something. In any case, I think perf is reasonable
so I would leave any perf improvements to follow-up PRs.
--
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]