3 ms·
Pure spin locks will always win for uncontended locks.
by saagarjha 3y ago
Pure spin locks will always win for uncontended locks.
- NobodyNada 3y agoWithout any contention at all, a spinlock and a mutex are identical: a single compare-and-swap.
- gpderetta 3y agoTechnically you can use a release-store on a spinlock unlock path, but you need a CAS for a mutex.