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

perf(mspc): replace bad VecDeque wait queue with intrusive list #16

Merged
merged 15 commits into from
Dec 9, 2021

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Dec 9, 2021

The new wait queue implementation doesn't allocate, and doesn't require
resizing a VecDeque inside a lock. This should improve performance and
(hopefully) make it possible to use the MPSC queue without any
allocations on no-std (once I figure out the static stuff).

Performance for blocking/yielding send is now very competitive after
switching to the new wait queue, compare the new violin plot of the integer
MPSC benchmark with violin plot with the old wait queue that i posted
in #14.

Old'n'busted:
image

New hotness:
image

Big comparison benchmark:
image

hawkw added 15 commits December 9, 2021 10:47
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
(lmao oops)

Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
@hawkw
Copy link
Owner Author

hawkw commented Dec 9, 2021

apparently the loom tests take over an hour to run on github actions so i'm just going to fiat merge this; the tests pass on my machine lol

@hawkw hawkw merged commit 23f4c96 into main Dec 9, 2021
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.

1 participant