a10y opened a new pull request, #6168:
URL: https://github.com/apache/arrow-rs/pull/6168

   # Which issue does this PR close?
   
   Closes #6167 .
   
   
   # Rationale for this change
   
   Improve the performance of take for `Utf8View` and `BinaryView` by up to 
16x. Here's benchmark results comparing before and after this change, taken 
with my M2 MBP:
   
   ```
   $ critcmp 2905ce6796cad396 2905ce6796cad396-unsafe-v2
   group                                            2905ce6796cad396            
           2905ce6796cad396-unsafe-v2
   -----                                            ----------------            
           --------------------------
   take str 1024                                    1.15     13.9±2.33µs        
? ?/sec    1.00     12.1±0.28µs        ? ?/sec
   take str 512                                     1.00      6.1±0.06µs        
? ?/sec    1.34      8.1±1.49µs        ? ?/sec
   take str null indices 1024                       1.02      8.0±0.06µs        
? ?/sec    1.00      7.8±0.08µs        ? ?/sec
   take str null indices 512                        1.03      3.7±0.07µs        
? ?/sec    1.00      3.6±0.06µs        ? ?/sec
   take str null values 1024                        1.00      7.6±0.06µs        
? ?/sec    1.01      7.7±0.06µs        ? ?/sec
   take str null values null indices 1024           1.00      4.6±0.03µs        
? ?/sec    1.06      4.9±0.02µs        ? ?/sec
   take stringview 1024                             16.84    14.1±0.17µs        
? ?/sec    1.00    835.0±5.36ns        ? ?/sec
   take stringview 512                              12.86     6.3±0.10µs        
? ?/sec    1.00    488.9±4.04ns        ? ?/sec
   take stringview null indices 1024                13.79    11.7±0.16µs        
? ?/sec    1.00   848.3±19.98ns        ? ?/sec
   take stringview null indices 512                 10.81     5.4±0.07µs        
? ?/sec    1.00    498.2±6.71ns        ? ?/sec
   take stringview null values 1024                 5.34      9.1±0.08µs        
? ?/sec    1.00  1708.9±11.28ns        ? ?/sec
   take stringview null values null indices 1024    3.01      6.9±0.08µs        
? ?/sec    1.00      2.3±0.06µs        ? ?/sec
   ``` 
   
   # What changes are included in this PR?
   
   * Mirror `take_byte` implementation for `take_byte_view` by doing a 
no-validation construction of the array data
   * Add stringview to the existing take kernel benchmark suite
   
   # Are there any user-facing changes?
   
   No behavior changes just performance.
   


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