zhuqi-lucas commented on issue #7744:
URL: https://github.com/apache/arrow-rs/issues/7744#issuecomment-3002856840

   Also try similar patch with above, still no performance improvement from the 
benchmark:
   
   ```rust
   diff --git a/arrow-array/src/array/byte_view_array.rs 
b/arrow-array/src/array/byte_view_array.rs
   index 713e275d18..2022e5959e 100644
   --- a/arrow-array/src/array/byte_view_array.rs
   +++ b/arrow-array/src/array/byte_view_array.rs
   @@ -552,10 +552,10 @@ impl<T: ByteViewType + ?Sized> GenericByteViewArray<T> 
{
    
            // one of the string is larger than 12 bytes,
            // we then try to compare the inlined data first
   -        let l_inlined_data = unsafe { 
GenericByteViewArray::<T>::inline_value(l_view, 4) };
   -        let r_inlined_data = unsafe { 
GenericByteViewArray::<T>::inline_value(r_view, 4) };
   +        let l_inlined_data = (l_view >> 32) as u32;
   +        let r_inlined_data = (r_view >> 32) as u32;
            if r_inlined_data != l_inlined_data {
   -            return l_inlined_data.cmp(r_inlined_data);
   +            return l_inlined_data.cmp(&r_inlined_data);
            }
    
            // unfortunately, we need to compare the full data
   
   ```


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