cpp: BufferWriter: Reserve chunkSize in constructor - #1643
Merged
Conversation
sebastianlipponer
requested review from
gasmith,
james-rms and
jtbandes
as code owners
May 15, 2026 15:18
sebastianlipponer
force-pushed
the
reserve_chunksize
branch
from
May 15, 2026 15:18
7cf90b0 to
6b5b5c9
Compare
clalancette
self-requested a review
May 28, 2026 21:16
clalancette
requested changes
May 29, 2026
clalancette
left a comment
Contributor
There was a problem hiding this comment.
One minor thing to change, otherwise this looks good.
Using my own benchmarks in #1611 for comparison, on chunked, uncompressed writes, this sped things up by about 2%.
sebastianlipponer
force-pushed
the
reserve_chunksize
branch
from
June 4, 2026 14:35
6b5b5c9 to
c28d863
Compare
clalancette
approved these changes
Jun 4, 2026
clalancette
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me, thanks for iterating.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changelog
cpp: BufferWriter: Reserve chunkSize in constructor
Docs
None
Description
The Buffer Writer at a 10M payload scale benefits the most, achieving a 2.22% reduction in median execution time. This is followed by the File Writer at 10M and 1M payload scales, which show performance gains of 0.88% and 0.73% respectively. Additionally, the Stream Writer at the 10M scale shows a measurable improvement of 0.41%.