neilconway opened a new pull request, #21849:
URL: https://github.com/apache/datafusion/pull/21849

   ## Which issue does this PR close?
   
   - Closes #21848.
   
   ## Rationale for this change
   
   We can use the new bulk-NULL string builder APIs to reduce NULL handling 
overhead in `replace`. There is a further opportunity for optimization once 
arrow/arrow-rs#9692 lands.
   
   Benchmarks:
   
   - `replace size=1024/replace_string_ascii_single [str_len=32]`: 17.42 µs → 
14.35 µs, **−17.71%**
   - `replace size=1024/replace_string_view [str_len=32]`: 21.23 µs → 18.89 µs, 
**−11.05%**
   - `replace size=1024/replace_string [str_len=32]`: 20.42 µs → 18.51 µs, 
**−9.36%**
   - `replace size=1024/replace_large_string [str_len=32]`: 20.83 µs → 18.42 
µs, **−11.60%**
   - `replace size=1024/replace_string_ascii_single [str_len=128]`: 10.61 µs → 
10.37 µs, **−2.22%**
   - `replace size=1024/replace_string_view [str_len=128]`: 28.37 µs → 28.03 
µs, **−1.21%**
   - `replace size=1024/replace_string [str_len=128]`: 27.96 µs → 28.03 µs, 
**+0.25%** (noise)
   - `replace size=1024/replace_large_string [str_len=128]`: 28.15 µs → 27.95 
µs, **−0.70%** (noise)
   - `replace size=4096/replace_string_ascii_single [str_len=32]`: 68.40 µs → 
56.15 µs, **−17.94%**
   - `replace size=4096/replace_string_view [str_len=32]`: 85.95 µs → 76.84 µs, 
**−10.61%**
   - `replace size=4096/replace_string [str_len=32]`: 82.79 µs → 74.71 µs, 
**−9.76%**
   - `replace size=4096/replace_large_string [str_len=32]`: 85.32 µs → 75.14 
µs, **−11.94%**
   - `replace size=4096/replace_string_ascii_single [str_len=128]`: 38.35 µs → 
39.10 µs, **+1.96%** (small regression)
   - `replace size=4096/replace_string_view [str_len=128]`: 132.77 µs → 128.08 
µs, **−3.53%**
   - `replace size=4096/replace_string [str_len=128]`: 127.71 µs → 128.29 µs, 
**+0.46%** (noise)
   - `replace size=4096/replace_large_string [str_len=128]`: 131.97 µs → 128.68 
µs, **−2.49%**
   
   ## What changes are included in this PR?
   
   * Use bulk-NULL string builders in `replace`
   
   ## Are these changes tested?
   
   Yes, covered by existing tests.
   
   ## Are there any user-facing changes?
   
   No.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to