Hacker News new | past | comments | ask | show | jobs | submit login

Pure spin locks will always win for uncontended locks.



Without any contention at all, a spinlock and a mutex are identical: a single compare-and-swap.


Technically you can use a release-store on a spinlock unlock path, but you need a CAS for a mutex.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: