-
Notifications
You must be signed in to change notification settings - Fork 9
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
Much higher performance with these changes #8
Comments
👍 but why not a PR? |
@omariom Because it's 100 lines of self-contained code. This should be distributed as source. For my needs I had to change API somewhat and I also have my own benchmark. |
buybackoff
added a commit
to buybackoff/MPMCQueue.NET
that referenced
this issue
Mar 6, 2020
See alexandrnikitin#8. This is helpful to see the diff.
See #9 for diff. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI
_bufferMask
, but use& _buffer.Length - 1
. This probably removes bound checks (already or likely in the future)var ref
for Cell.With these changes performance with 12 threads (2x6 HT) is almost the same as with 1 thread at around 39 millions dequeue+enqueue operations per second. Before the changes it was much worse.
More details here.
Benchmarking code is here. Not sure how that compares to the numbers from readme here in nanos.
BTW, #6 has negative impact.
This code could be copy-pasted to .NET Standard 2.0.
The text was updated successfully, but these errors were encountered: