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
Save producerIndex load while polling a pooled chunk on mpmc xadd q #269
Conversation
Pull Request Test Coverage Report for Build 580
💛 - Coveralls |
This pull request introduces 1 alert when merging 687a3fb into 671c0a8 - view on LGTM.com new alerts:
|
687a3fb
to
75793bb
Compare
This pull request introduces 1 alert when merging 75793bb into 671c0a8 - view on LGTM.com new alerts:
|
75793bb
to
3322e9f
Compare
@nitsanw this is ready to be reviewed/merged |
@nitsanw Wait a sec: I see this
This hasn't happened before, but seems present from the beginning, I've alread sent #270 to fix it |
@nitsanw Despite what CI says (see comment above), this is ready to be reviewed/merged |
The change on poll introduced by fc29784 has caused a performance regression due to an increased number of
producerIndex
loads.This PR is using
consumerBuffer::index
to save someproducerIndex
loads, while preserving correctness of fast fail (ie return null) during a rotation if there are no other elements but the first one in the next chunk.Some results by running
master:
this PR:
These results show that saving unecessary
producerIndex
loads on rotation can make a lot of difference, hence #265 could be very beneficial to be implemented for a future release.