Skip to content
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

Avoid reallocations in first keep, bound stash size #430

Merged

Conversation

antiguru
Copy link
Member

A follow-up to #425. Retain two elements instead of three in the stash. Avoid doubling reallocations in the first keep object.

The second change is up for discussion: If we expect few (more than zero) elements to be kept, it's worse to use a complete buffer, but the cost to reallocate should quickly outweigh the const of allocating a large buffer (or, reusing one for that matter.) This also changes if we already have a buffer in the stash, where it would be clearly beneficial to use that allocation instead of getting a new one.

@frankmcsherry
Copy link
Member

These changes seem good to me. Not sure what is up with the error, but modulo that looks good to me.

A follow-up to TimelyDataflow#425. Retain two elements instead of three in the stash.
Avoid doubling reallocations in the first `keep` object.

Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
@antiguru
Copy link
Member Author

I should have cargo checked before pushing :) Fixed!

@frankmcsherry frankmcsherry merged commit 32a312f into TimelyDataflow:master Nov 25, 2023
1 check passed
@antiguru antiguru deleted the merge_batcher_col_keep_stash branch November 25, 2023 19:02
This was referenced Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants