Skip to content

fix _growbeg! unnecessary resizing#56029

Merged
oscardssmith merged 7 commits intomasterfrom
os/fix-_growbeg!-logic
Oct 10, 2024
Merged

fix _growbeg! unnecessary resizing#56029
oscardssmith merged 7 commits intomasterfrom
os/fix-_growbeg!-logic

Conversation

@oscardssmith
Copy link
Copy Markdown
Member

@oscardssmith oscardssmith commented Oct 7, 2024

This was very explicitly designed such that if there was a bunch of extra space at the end of the array, we would copy rather than allocating, but by making newmemlen be at least overallocation(memlen) rather than overallocation(len), this branch was never hit. Fix #56026

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrays [a, r, r, a, y, s]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prepend! allocates when X is empty even when there's capacity

4 participants