-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Implement resize!(...; first=true)
#57313
base: master
Are you sure you want to change the base?
Conversation
Actually there is not a lot of consensus on the name in #26326. The options nonetheless could be maybe:
the second is also appealing, the first seems better to me because of simmetry with other functions e.g. |
IMO this is good functionality to publicize, tagging triage to discuss a new feature and to discuss naming. |
Triage thinks this should be spelled |
resize(..., first=true)
resize!(..., first=true)
The failures seem unrelated, let me know if the implementation is okay now |
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.
Looks pretty good, I left a few suggestions.
resize!(..., first=true)
resize!(...; first=true)
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.
IDK if an optimization that only applies when the resize amount is a multiple of 64 is actually worth implementing, especially if the resulting performance quirk is not documented.
to me it seems possibly good because someone interested in such a performance optimization (consider that the optimized version is orders of magnitudes faster than the other) would probably look at the implementation of |
Co-authored-by: Lilith Orion Hafner <[email protected]>
Also, it seems possible to me to apply this optimization for any |
Fixes #26326