jorgecarleitao opened a new pull request #9077:
URL: https://github.com/apache/arrow/pull/9077
This is a corollary of the new API PRed in #9076 , and how we can use it to
efficiently build `Buffer` without even using the `MutableBuffer`. The main
idea here is that we can write
```
let lengths: Buffer = slice
.windows(2)
.map(|offset| offset[1] - offset[0])
.collect();
```
and this (efficiently) builds a `Buffer` from the offset differences.
Bench:
```
length time: [3.2345 us 3.2457 us 3.2602 us]
change: [-12.072% -11.361% -10.654%] (p = 0.00 <
0.05)
Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
4 (4.00%) high mild
6 (6.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.
For queries about this service, please contact Infrastructure at:
[email protected]