andygrove opened a new pull request, #23462: URL: https://github.com/apache/datafusion/pull/23462
> This PR was created by an LLM as a draft PR. I will mark it as ready for review after human review. ## Which issue does this PR close? N/A — autonomous exploratory PR. ## Rationale for this change Rewrote calculate_ascii to skip per-element null checks in the no-null case, use value_unchecked to avoid bounds checks, and add an ASCII leading-byte fast path that avoids char-iterator decoding for ASCII strings. ## What changes are included in this PR? Rewrote calculate_ascii to skip per-element null checks in the no-null case, use value_unchecked to avoid bounds checks, and add an ASCII leading-byte fast path that avoids char-iterator decoding for ASCII strings. ## Are these changes tested? Correctness: unit tests + seeded differential fuzz (bit-identical Arrow output vs `main`). Benchmark (criterion): - ascii_string_ascii_only (null_density=0.5): 23.96% faster (base 8224ns -> cand 6253ns) - ascii_string_utf8 (null_density=0.5): 17.558% faster (base 10529ns -> cand 8680ns) - ascii_string_ascii_only (null_density=0): 35.842% faster (base 6577ns -> cand 4219ns) - ascii_string_utf8 (null_density=0): 23.205% faster (base 11179ns -> cand 8585ns) - ascii_scalar_utf8view: -1.162% faster (base 44ns -> cand 44ns) - ascii_scalar_utf8: -2.266% faster (base 43ns -> cand 44ns) - ascii_string_view_utf8 (null_density=0): 20.23% faster (base 11948ns -> cand 9531ns) - ascii_string_view_ascii_only (null_density=0): 24.794% faster (base 7063ns -> cand 5312ns) - ascii_string_view_ascii_only (null_density=0.5): 13.057% faster (base 9270ns -> cand 8060ns) - ascii_string_view_utf8 (null_density=0.5): 9.403% faster (base 11671ns -> cand 10573ns) ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> -- 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]
