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

   ## Which issue does this PR close?
   
   - Closes #20351.
   
   ## Rationale for this change
   
   When all values in a `Utf8`/`LargeUtf8` array are ASCII, we can skip using 
`GenericStringBuilder` and instead process the entire input buffer in a single 
pass using byte-level operations. This also avoids recomputing the offsets and 
nulls arrays. A similar optimization is already used for lower() and upper().
   
   Along the way, optimize `initcap_string()` for ASCII-only inputs. It already 
had an ASCII-only fastpath but there was room for further optimization.
   
   ## What changes are included in this PR?
   
   * Cleanup benchmarks: we ran the scalar benchmark for different array sizes, 
despite the fact that it is invariant to the array size
   * Add benchmark for different string lengths
   * Optimize for ASCII-only inputs as described above
   
   ## Are these changes tested?
   
   Yes, no additional tests needed.
   
   ## 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