gavinclarke0
Joined 4 years ago
Karma
110
Submissions
4
Member since
Jan 13
Joined 4 years ago
I do not doubt majority of cases a mutex is faster/more appropriate. However the key there is looking at what m.lockslow() or unlockSlow() does which is called on lock contention. They become spinlocks that are not entirely dissimilar to my implementation.
The idea is that a lockless algorithm is trading a worse best case i.e m.lockSlow is not called for a better worse case. Again if this is true in this exact case, I am not sure as I have not benchmarked it against a naive mutex based ringbuffer.
Looking back, I now see where I agreed, but the manner in which they attempt to deceive you is criminal.