neilconway opened a new pull request, #21863:
URL: https://github.com/apache/datafusion/pull/21863
## Which issue does this PR close?
- Closes #21862.
## Rationale for this change
Similar to other recent changes, we can use the bulk-NULL string builders to
avoid per-row NULL handling overhead.
Benchmarks:
- scalar/scalar_utf8: 227.4ns → 228.6ns (+0.53%)
- scalar/scalar_utf8view: 227.9ns → 229.2ns (+0.57%)
- size=1024 str_len=128/array_utf8: 276.5µs → 277.7µs (+0.43%)
- size=1024 str_len=128/array_utf8view: 223.3µs → 222.4µs (−0.40%)
- size=1024 str_len=16/array_utf8: 37.5µs → 37.4µs (−0.27%)
- size=1024 str_len=16/array_utf8view: 41.9µs → 39.3µs (−6.21%)
- size=4096 str_len=128/array_utf8: 1115.4µs → 1109.2µs (−0.56%)
- size=4096 str_len=128/array_utf8view: 900.2µs → 895.2µs (−0.56%)
- size=4096 str_len=16/array_utf8: 148.3µs → 148.4µs (+0.07%)
- size=4096 str_len=16/array_utf8view: 164.2µs → 153.8µs (−6.33%)
- size=8192 str_len=128/array_utf8: 2.2ms → 2.2ms (0.00%)
- size=8192 str_len=128/array_utf8view: 1811.2µs → 1819.2µs (+0.44%)
- size=8192 str_len=16/array_utf8: 299.0µs → 299.3µs (+0.10%)
- size=8192 str_len=16/array_utf8view: 330.6µs → 310.2µs (−6.17%)
- unicode size=1024/array_utf8: 772.2µs → 769.2µs (−0.39%)
- unicode size=1024/array_utf8view: 777.8µs → 779.2µs (+0.18%)
- unicode size=4096/array_utf8: 3.1ms → 3.1ms (0.00%)
- unicode size=4096/array_utf8view: 3.1ms → 3.1ms (0.00%)
- unicode size=8192/array_utf8: 6.2ms → 6.1ms (−1.61%)
- unicode size=8192/array_utf8view: 6.2ms → 6.2ms (0.00%)
## What changes are included in this PR?
* Switch to bulk-NULL string builders
* Optimize `StringViewArrayBuilder::append_value()` by inlining the view
construction for > 12 byte strings. Empirically this improved performance,
probably because `make_view` can't be inlined. This should also help other PRs
in this series.
## 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]