Re:Mutexes are faster than Spinlocks
by gpm on Saturday January 04, 2020 @12:52PM
(#21956248)
You're misreading the benchmark, that's 6ms for 10,000 lock/unlocks per thread, 320,000 lock/unlocks total. In other words 0.6 microseconds per thread per lock.
[ Parent
| on HN ]
That's still unreasonably high, isn't it? Even a Go sync.Mutex, not exactly a hot-rod implementation, can be acquired and released in < 50ns on the garbage hardware I have before me.