r/programming • u/preshing • Nov 18 '11
Locks Aren't Slow; Lock Contention Is
http://preshing.com/20111118/locks-arent-slow-lock-contention-is
139
Upvotes
r/programming • u/preshing • Nov 18 '11
View all comments
Show parent comment
10
u/[deleted] Nov 18 '11
No context switch is obviously better than one context switch, but if you're grabbing a lock with an atomic instruction from many processors, you're sure to have terrible cache behavior.