mbutrovich commented on issue #12467:
URL: https://github.com/apache/arrow-rs/issues/12467#issuecomment-7173973012

   > I'd keep `memcmp` (`a[k..].cmp(&b[k..])`) for long shared prefixes instead 
of scanning with `common_prefix_len` and comparing the byte at the mismatch.
   
   @viirya you were right. With the scan, `large_string_non_null` was 0.76x to 
0.89x in every configuration, and `string_dictionary_1pct_cardinality` was 
0.73x to 0.86x on amd64 (for example, [amd64 
aligned](https://github.com/apache/arrow-rs/pull/12470#issuecomment-7172767884)).
 #12470 now compares the first 8 bytes inline and calls `a.cmp(b)` for 
everything else. Both cases are back to 0.94x to 1.07x, and the gains hold: 
`string_dictionary_low_cardinality_400` is 1.35x to 1.76x and 
`short_string_non_null` 1.19x to 1.46x ([amd64 
aligned](https://github.com/apache/arrow-rs/pull/12470#issuecomment-7173600010),
 [arm64 
aligned](https://github.com/apache/arrow-rs/pull/12470#issuecomment-7173536379)).
 The `DELTA_BYTE_ARRAY` cases recovered along with plain encoding, so 
`common_prefix_len` wasn't the cause.


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

Reply via email to