Skip to content

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

Merged
hawkw merged 15 commits intomainfrom
eliza/wait-q3
Dec 9, 2021
Merged

perf(mspc): replace bad VecDeque wait queue with intrusive list#16
hawkw merged 15 commits intomainfrom
eliza/wait-q3

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