neilconway opened a new pull request, #21482:
URL: https://github.com/apache/datafusion/pull/21482
## Which issue does this PR close?
- Closes #21481.
## Rationale for this change
`array_slice` does a per-row NULL checking (in four different arrays!). It
would be faster to take the union of the four input NULL buffers via
`NullBuffer::union`.
Benchmarks (Arm64):
```
- List(Int64), array args: 60.98ms -> 58.35ms (-4.3%)
- List(Int64), array args, no stride: 28.19ms -> 25.92ms (-8.0%)
- List(Int64), scalar args, no stride: 57.07ms -> 55.56ms (-2.6%)
- List(Int64), scalar args, stride=-2: 99.44ms -> 96.05ms (-3.4%)
- List(Int64), scalar args, stride=-1: 155.23ms -> 155.30ms (+0.0%)
- List(Int64), scalar args, stride=1: 58.50ms -> 55.91ms (-4.4%)
- List(Int64), scalar args, stride=2: 151.45ms -> 146.83ms (-3.1%)
- ListView(Int64), array args: 56.19ms -> 52.86ms (-5.9%)
- ListView(Int64), array args, no stride: 28.53ms -> 24.35ms (-14.7%)
- ListView(Int64), scalar args, no stride: 58.65ms -> 58.34ms (-0.5%)
- ListView(Int64), scalar args, stride=-2: 93.85ms -> 91.59ms (-2.4%)
- ListView(Int64), scalar args, stride=-1: 149.68ms -> 149.06ms (-0.4%)
- ListView(Int64), scalar args, stride=1: 59.53ms -> 58.90ms (-1.1%)
- ListView(Int64), scalar args, stride=2: 143.07ms -> 139.55ms (-2.5%)
```
## What changes are included in this PR?
## Are these changes tested?
Yes.
## 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]