Skip to content

Conversation

milseman
Copy link
Member

@milseman milseman commented May 23, 2018

4.2 cherry-pick of #16694

rdar://problem/39501083

milseman added 2 commits May 23, 2018 15:38
Add StringBuilderSmallReservingCapacity variant to measure the excess
overhead caused by calls to reserve capacity. If a string is small,
and the capacity is small, this will demonstrate overhead if an
allocation happens.
If the requested capacity is small enough to fit in our small string
representation, don't allocate a UTF-16 buffer, instead just return
early.
@milseman milseman changed the title 4 2 smol reservations [4.2] Cherry pick: skip allocation if reserve capacity is smol May 23, 2018
@milseman
Copy link
Member Author

@swift-ci please test

1 similar comment
@milseman
Copy link
Member Author

@swift-ci please test

@milseman milseman merged commit 5132c04 into swiftlang:swift-4.2-branch May 24, 2018
@milseman milseman deleted the 4_2_smol_reservations branch May 24, 2018 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant