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

Introduce SmallVec for small allocations #581

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

frankmcsherry
Copy link
Member

This PR introduce the use of SmallVec for allocations backing ChangeBatch and Antichain. These often have at most two and one, respectively, elements in them. I made ChangeBatch itself generic, and Antichain not. Probably best to unify these.

It takes a modified event_driven.rs from

cargo run --example event_driven --release -- 1000 1000 no  5.31s user 0.59s system 96% cpu 6.124 total

to

cargo run --example event_driven --release -- 1000 1000 no  4.56s user 0.59s system 95% cpu 5.382 total

Some noise is these measurements, but the relative improvement seems consistent.

Copy link
Member

@antiguru antiguru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@frankmcsherry frankmcsherry merged commit 0da150a into TimelyDataflow:master Sep 6, 2024
1 check passed
@frankmcsherry frankmcsherry deleted the smallvec branch September 6, 2024 16:38
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