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

Improve lock: replace spin-on-compare-and-set with spin-on-read #57

Merged
merged 1 commit into from Oct 28, 2020

Conversation

killme2008
Copy link
Contributor

@killme2008 killme2008 commented Jan 16, 2018

Improve the spin lock implementation. Replace spin-on-test-and-set with spin-on-read, it's more friendly with SMP per-CPU cache, and get better performance(almost 3%~7% speed up when running benchmark on my machine(ubuntu 17.10) under different threads size concurrent).

@killme2008
Copy link
Contributor Author

@snazy hi, sorry, excuse me.Have you review the PR? I think it's valuable.

@snazy
Copy link
Owner

snazy commented Feb 1, 2018

@killme2008 sorry, i haven't had time to dig into that yet.

@snazy snazy merged commit a01fe81 into snazy:develop Oct 28, 2020
@snazy
Copy link
Owner

snazy commented Oct 28, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants