andygrove opened a new pull request, #4914:
URL: https://github.com/apache/datafusion-comet/pull/4914
> 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
Replaced the per-row `to_ascii_lowercase()` String allocation in the
string-to-boolean cast with an allocation-free length-dispatched
`eq_ignore_ascii_case` match, and dropped the per-row `Result` for the non-ANSI
eval modes.
## What changes are included in this PR?
Replaced the per-row `to_ascii_lowercase()` String allocation in the
string-to-boolean cast with an allocation-free length-dispatched
`eq_ignore_ascii_case` match, and dropped the per-row `Result` for the non-ANSI
eval modes.
## How are these changes tested?
Correctness: unit tests + seeded differential fuzz (bit-identical Arrow
output vs `main`).
Benchmark (criterion):
- legacy_mixed: 68.325% faster (base 156779ns -> cand 49659ns)
- try_mixed: 68.699% faster (base 158363ns -> cand 49570ns)
- legacy_valid: 67.019% faster (base 169509ns -> cand 55905ns)
- ansi_valid: 68.293% faster (base 171297ns -> cand 54313ns)
- try_valid: 67.195% faster (base 169282ns -> cand 55533ns)
Full criterion output:
```text
cast_string_to_boolean/legacy/mixed
time: [49.828 µs 50.046 µs 50.365 µs]
change: [−68.437% −68.325% −68.202%] (p = 0.00 <
0.05)
Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
cast_string_to_boolean/legacy/valid
time: [55.765 µs 55.855 µs 55.965 µs]
change: [−67.067% −67.019% −66.955%] (p = 0.00 <
0.05)
Performance has improved.
Found 16 outliers among 100 measurements (16.00%)
6 (6.00%) low severe
1 (1.00%) low mild
9 (9.00%) high severe
cast_string_to_boolean/try/mixed
time: [49.542 µs 49.571 µs 49.615 µs]
change: [−68.723% −68.699% −68.676%] (p = 0.00 <
0.05)
Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high severe
cast_string_to_boolean/try/valid
time: [55.479 µs 55.502 µs 55.533 µs]
change: [−67.236% −67.195% −67.142%] (p = 0.00 <
0.05)
Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
3 (3.00%) high mild
4 (4.00%) high severe
cast_string_to_boolean/ansi/valid
time: [54.193 µs 54.227 µs 54.275 µs]
change: [−68.532% −68.293% −68.070%] (p = 0.00 <
0.05)
Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
2 (2.00%) high mild
3 (3.00%) high severe
```
--
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]