2 ms·
uncontended mutexes are very cheap but not free. lock cmpxchg has way higher latency (and coherency traffic) costs than a simple move or (xchg). Java had lock e
by xxs 2y ago
uncontended mutexes are very cheap but not free. lock cmpxchg has way higher latency (and coherency traffic) costs than a simple move or (xchg). Java had lock elision, effectively trying to solve the hardware problem in software back in mid 00s. There are optimizations to be made it running on a single core (no need for the lock), e.g. docker with taskset