Mutexes are faster than Spinlocks
The author has an implicit definition of "faster" which it is important to be aware of.The main use of spinlocks that i'm aware of is minimising latency in inter-processor communication.That is, if you have a worker task which is waiting for a supervisor task to tell it to do something, then to minimise the time between the supervisor giving the order and the worker getting to work, use a spinlock.For this to really work, you need to implement both tasks as threads pinned to dedicated cores, so they won't be preeempted. You will burn a huge amount of CPU doing this, and so it won't be "faster" from a throughput point of view. But the latency will be as low as it's possible to go.