-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-11048: [Rust] Added bench to MutableBuffer #9032
Conversation
I am not sure what is causing the difference, I would expect it to be faster just as |
I think |
just FYI, I found one reason. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice to be able to measure this / remove inefficiencies 👍
The full set of Rust CI tests did not run on this PR :( Can you please rebase this PR against apache/master to pick up the changes in #9056 so that they do? I apologize for the inconvenience. |
Codecov Report
@@ Coverage Diff @@
## master #9032 +/- ##
=======================================
Coverage 82.61% 82.61%
=======================================
Files 202 202
Lines 50048 50048
=======================================
Hits 41347 41347
Misses 8701 8701 Continue to review full report at Codecov.
|
I believe these benches were already added as part of #8997 (which I found out while trying to merge this PR -- LOL) |
Closing as this code was merged as part of another PR |
This bench compares the behavior of
MutableBuffer
vs allocatingVec<u8>
and usingextend_from_slice
.On my computer:
I.e. growing a
MutableBuffer
seems to be 2x faster than creating aVec
and usingBuffer::from
to convert it to aBuffer
.It is odd that creating a buffer with the correct capacity takes longer, though. Any ideas @jhorstmann , @Dandandan ?