-
Notifications
You must be signed in to change notification settings - Fork 915
Speedup take_bytes (-35% -69%) by precalculating capacity #7422
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
Conversation
This is ready now |
Is it fair to say that in general you've done a few refactors recently that replace |
I think at this point there is little point in using It might be worth spending some time documenting the best and most performant way to construct / transform Arrow arrays and apply it accross the arrow-rs create (marking stuff as deprecated if needed). |
I will take a proper review pass this afternoon. |
Do you see the same performance regression for Main:
PR:
|
I am not at a machine right now to test, but StringView doesn't use this code path. |
Generated code looks the same, so must be some sort of noise on my machine. |
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.
I think at this point there is little point in using
MutableBuffer
overVec
as the latter provides more performant (specialization overT
, better inlining), slightly more safe and more complete API. The same probably applies for a lot ofBuilder
-type APIs probably.It might be worth spending some time documenting the best and most performant way to construct / transform Arrow arrays and apply it accross the arrow-rs create (marking stuff as deprecated if needed).
This LGTM and is a great improvement. I also would love to see this documentation if you don't mind dumping your thoughts on the topic while they're fresh!
Which issue does this PR close?
Closes #7432
Rationale for this change
Performance improvements:
Are there any user-facing changes?