News for hackers. Stuff that matters.
Re:Mutexes are faster than Spinlocks by rwem on Saturday January 04, 2020 @08:35PM (#21958985)
If you only have 4 threads it is likely that all your CPUs are sharing caches and you won't see the real downside of the spinlock. They don't really fall apart until you have several sockets.
Re:Mutexes are faster than Spinlocks by nathanielherman on Saturday January 04, 2020 @09:59PM (#21959335)
Note that I get a similar speedup with 6 and 8 threads on my Mac (which has 8 logical CPUs)