Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize
StringWriter
scenarios involving SetWriteSizeHint()
: res…
…ize the destination to capacity and set up the buffer right at the end of `SetWriteSizeHintImpl()`, instead of waiting for e.g. `Push()` falling to `PushSlow()`, synchronizing the buffer, figuring out that the current capacity will be sufficient, and finally doing the same. This speeds up some simple usages by about 10%. PiperOrigin-RevId: 566338632
- Loading branch information