alamb commented on code in PR #7530:
URL: https://github.com/apache/arrow-rs/pull/7530#discussion_r2097662271
##########
arrow-ord/src/sort.rs:
##########
@@ -724,15 +724,46 @@ pub fn lexsort_to_indices(
len = limit.min(len);
}
- let lexicographical_comparator =
LexicographicalComparator::try_new(columns)?;
- // uint32 can be sorted unstably
- sort_unstable_by(&mut value_indices, len, |a, b| {
+ match columns.len() {
Review Comment:
I think it would be worth a comment here explaining the repetition is
purposeful to generate specialized code for small numbers of columns
```suggestion
// Instantiate specialized versions of comparisons for small numbers
// of columns as it helps the compiler generate better code.
match columns.len() {
```
--
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]