Use reserve
in LocalVector::resize
, to restore expected growth behavior
#107796
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resize_initialized
andresize_uninitialized
toVector
andLocalVector
#104522 (rebase loss)We introduced 1.5x growth factor for
LocalVector
in 4.5 with #100944.3 months later, this regressed for
resize
with #104522 (sorry!).This makes the current
LocalVector
growth inconsistent, with 2x forresize
and1.5x
for other operations.There are no actual problems associated with this change (i think), so It's not super risky to merge for 4.5 still — but it's also not a super important bug to fix. 4.6 would also be an OK target for this PR.