You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was having a poke through the code and was looking at the adaptive backoff spinning code and putting it into godbolt to see what it was doing. I noticed that LLVM wasn't actually unrolling the loops for the backoff spinning, so I had try at forcing it to do so.
What I found was actually fairly significant performance increases over current master. You can view the code I changed here: https://rust.godbolt.org/z/f3Psh5end
Here is an example of the performance increases I was getting:
Compared to master here:
Just wondering what your thoughts where? I ran this benchmark multiple times to be sure but the results seemed to be consistently better. If you like the sound of it I can create a PR to make the changes.
Many Thanks
Jack
The text was updated successfully, but these errors were encountered:
This is slightly counter-intuitive, but throughput increases when the spin takes longer. The reason for this is that a spinning core isn't fighting with another core for exclusive ownership of a cacheline, which allows a single core to quickly lock/unlock the mutex in succession without interference. While this is good for throughput, it is bad for overall system performance because you end up with a lot of core spinning instead of doing useful work (e.g. background processes).
Hi love this library and using it a lot!
I was having a poke through the code and was looking at the adaptive backoff spinning code and putting it into godbolt to see what it was doing. I noticed that LLVM wasn't actually unrolling the loops for the backoff spinning, so I had try at forcing it to do so.
What I found was actually fairly significant performance increases over current master. You can view the code I changed here:
https://rust.godbolt.org/z/f3Psh5end
Here is an example of the performance increases I was getting:
Compared to master here:
Just wondering what your thoughts where? I ran this benchmark multiple times to be sure but the results seemed to be consistently better. If you like the sound of it I can create a PR to make the changes.
Many Thanks
Jack
The text was updated successfully, but these errors were encountered: