samuelcolvin commented on PR #6118:
URL: https://github.com/apache/arrow-rs/pull/6118#issuecomment-2254528067

   I think the behavior here is again related to the unrealistically short (4 
character) haystack used in benchmarks as I explained  in 
https://github.com/apache/arrow-rs/pull/6128#issuecomment-2254513573.
   
   Running
   
   ```bash
   #!/usr/bin/env bash
   set -ex
   git checkout master
   rm -rf target/criterion
   cargo bench -p arrow --bench comparison_kernels -F test_utils -- 
--save-baseline master 'like.*(starts|ends) with'
   BRANCH_NAME=starts_with-ends_with-improvements
   git checkout $BRANCH_NAME
   cargo bench -p arrow --bench comparison_kernels -F test_utils -- 
--save-baseline $BRANCH_NAME 'like.*(starts|ends) with'
   critcmp master $BRANCH_NAME
   ```
   
   on a `c2-standard-8` GCP instance.
   
   ### With haystack length=4 (default)
   
   ```
   group                               master                                 
starts_with-ends_with-improvements
   -----                               ------                                 
----------------------------------
   ilike_utf8 scalar ends with         1.00    234.5±0.69µs        ? ?/sec    
1.05    247.4±0.70µs        ? ?/sec
   ilike_utf8 scalar starts with       1.00    251.4±0.39µs        ? ?/sec    
1.19    298.0±1.11µs        ? ?/sec
   like_utf8 scalar ends with          1.52    234.5±0.34µs        ? ?/sec    
1.00    154.6±0.58µs        ? ?/sec
   like_utf8 scalar starts with        1.22    253.7±0.44µs        ? ?/sec    
1.00    207.8±2.90µs        ? ?/sec
   like_utf8view scalar ends with      1.25     61.2±0.20ms        ? ?/sec    
1.00     48.9±0.22ms        ? ?/sec
   like_utf8view scalar starts with    1.07     58.1±0.17ms        ? ?/sec    
1.00     54.3±0.15ms        ? ?/sec
   nilike_utf8 scalar ends with        1.00    234.7±0.81µs        ? ?/sec    
1.06    247.6±0.84µs        ? ?/sec
   nilike_utf8 scalar starts with      1.00    251.4±0.34µs        ? ?/sec    
1.19    298.2±1.02µs        ? ?/sec
   nlike_utf8 scalar ends with         1.52    234.4±0.25µs        ? ?/sec    
1.00    154.7±1.81µs        ? ?/sec
   nlike_utf8 scalar starts with       1.22    253.8±0.72µs        ? ?/sec    
1.00    207.3±0.55µs        ? ?/sec
   ```
   
   ### With random haystack length=0..400
   
   ```
   group                                     master                             
    starts_with-ends_with-improvements
   -----                                     ------                             
    ----------------------------------
   ilike_utf8 scalar ends with               1.10  1042.3±49.28µs        ? 
?/sec    1.00   947.9±45.76µs        ? ?/sec
   ilike_utf8 scalar starts with             1.02  1056.6±29.14µs        ? 
?/sec    1.00  1036.7±54.46µs        ? ?/sec
   like_utf8 scalar ends with                1.75   480.0±14.59µs        ? 
?/sec    1.00   274.8±16.16µs        ? ?/sec
   like_utf8 scalar starts with              1.39    499.2±6.69µs        ? 
?/sec    1.00    358.8±5.57µs        ? ?/sec
   like_utf8view scalar ends with            1.16     56.5±0.28ms        ? 
?/sec    1.00     48.6±0.17ms        ? ?/sec
   like_utf8view scalar starts with          1.08     57.5±0.17ms        ? 
?/sec    1.00     53.3±0.24ms        ? ?/sec
   nilike_utf8 scalar ends with              1.05   995.0±19.04µs        ? 
?/sec    1.00   951.9±49.82µs        ? ?/sec
   nilike_utf8 scalar starts with            1.00  1056.0±40.94µs        ? 
?/sec    1.00  1050.8±34.07µs        ? ?/sec
   nlike_utf8 scalar ends with               1.76    479.3±9.99µs        ? 
?/sec    1.00   272.0±25.31µs        ? ?/sec
   nlike_utf8 scalar starts with             1.36    499.1±5.47µs        ? 
?/sec    1.00    367.9±8.76µs        ? ?/sec
   ```


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