Repository navigation
[ntuple] Resize RVecs geometrically - #23718
Merged
Merged
Conversation
When reading consecutive entries with variable-sized RVec collections, ResizeRVec previously reallocated only enough capacity for nItems. This incurred frequent reallocations across entries with growing element counts. Grow capacity geometrically (doubling, capped at int32_t max) when reallocating an already-allocated RVec, amortizing allocation costs and avoiding repeated malloc/free cycles across entry iterations. Assisted-by: antigravity:gemini
Grow by doubling until 16 items, then grow only by 50%.
1 of 2 tasks
pcanal
reviewed
Oct 14, 2026
pcanal
reviewed
Oct 14, 2026
Test Results 24 files 24 suites 3d 23h 41m 12s ⏱️ For more details on these failures, see this check. Results for commit 5e19ae3. ♻️ This comment has been updated with latest results. |
jblomer
force-pushed
the
ntuple-rvec-growth
branch
from
October 14, 2026 20:26
7ba02b4 to
dfa2a7c
Compare
As we now grow geometrically, also shrink geometrically. Half the capacity when the size falls below 1/4.
pcanal
reviewed
Oct 14, 2026
Co-authored-by: Philippe Canal <pcanal@fnal.gov>
jblomer
force-pushed
the
ntuple-rvec-growth
branch
from
October 15, 2026 19:01
7875428 to
5e19ae3
Compare
Co-authored-by: Philippe Canal <pcanal@fnal.gov>
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.
Extended version of #23685