-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TEST for allocation strategy in min/max accumulator #12845
Conversation
fn set_value(&mut self, group_index: usize, new_val: &[u8]) { | ||
match self.min_max[group_index].as_mut() { | ||
None => { | ||
// No existing value, so allocate a new one (allocate 2x the size of the input) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the change in this PR
Here are some benchmark results (tldr I don't think changing the allocation strategy makes a measurable difference) Maybe the internal allocator already avoids most reallocations (on small existing allocations) Note that only Q21, Q22 and Q28 actually have Seems like
|
This is a draft PR to test a suggestion from @Dandandan in #12792 #12792 (comment)
Change in 576cc32 and I am running performance tests