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

Always allocate notifiers for blocked senders #3

Merged
merged 1 commit into from Oct 30, 2022

Conversation

sbarral
Copy link
Member

@sbarral sbarral commented Oct 30, 2022

Previous versions of tachyonix would cache the notifiers and their associated waker in the sender. While in theory this spares both on allocation and waker cloning, it appears to prevent some optimizations and actually results in worse performance across nearly all benchmarks and benchmark parameters.

So this is a "worse" version which appears to perform better and makes it possible to have the sender take self by shared reference rather than by mutable reference.

Also, this commit removes the UnsafeCell around the waker, which was there only to enable tracking through loom but which turned out to have a non-negligible impact on performance.

Previous versions of tachyonix would cache the notifiers and their
associated waker in the sender. While in theory this spares both on
allocation and waker cloning, it appears to prevent some optimizations
and actually results in worse performance across nearly all benchmarks
and benchmark parameters.

So this is a "worse" version which appears to perform better and makes
it possible to have the sender take `self` by shared reference rather
than by mutable reference.

Also, this commit removes the `UnsafeCell` around the waker, which was
there only to enable tracking through loom but which turned out to have
a non-negligible impact on performance.
@sbarral sbarral merged commit a58e0ce into main Oct 30, 2022
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.

None yet

1 participant