You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 28655d8
Browse filesBrowse the repository at this point in the historyBrowse files
Address review: drop shrink_to_fit from split_vec_min_alloc split-off branch
ariel-miculas noted the split-off branch should not call shrink_to_fit
"for now". The downstream caller in multi_group_by/bytes.rs pushes onto
the emitted prefix immediately (first_n_offsets.push(offset_n)). With
shrink_to_fit, that push reallocates and Vec growth lands the prefix at
a capacity larger than the original allocation, defeating the intended
memory saving. Without it, the push reuses the preserved allocation and
no realloc occurs.
The shrink was added to keep capacity-based memory accounting honest,
but in the real call path it spends a reallocation for no gain. Defer
that concern; revisit it as a caller-side property if needed.
Adds emitted_prefix_does_not_realloc_on_push, a self-documenting test
that proves the pathology empirically: the preserved allocation survives
a push without realloc, while a shrunk prefix reallocs to a larger
capacity on the same push.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
0 commit comments