jorgecarleitao opened a new pull request #9032:
URL: https://github.com/apache/arrow/pull/9032
This bench compares the behavior of `MutableBuffer` vs allocating `Vec<u8>`
and using `extend_from_slice`.
On my computer:
```
mutable time: [579.24 us 580.21 us 581.34 us]
mutable prepared time: [614.98 us 616.15 us 617.42 us]
from_slice time: [1.2945 ms 1.3262 ms 1.3607 ms]
from_slice prepared time: [1.0161 ms 1.0472 ms 1.0881 ms]
```
I.e. growing a `MutableBuffer` seems to be 2x faster than creating a `Vec`
and using `Buffer::from` to convert it to a `Buffer`.
It is odd that creating a buffer with the correct capacity takes longer,
though. Any ideas @jhorstmann , @Dandandan ?
----------------------------------------------------------------
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]