Highly contended and fair locking in Java

from blog Marc Brooker's Blog, | ↗ original
Highly contended and fair locking in Java How do explicit locks compare to volatile access? In my last post on Java’s volatile, I showed how (in one set of experiments) Java volatile variable reads don’t come for free. The cost of accessing a highly-contended volatile variable in one micro-benchmark came out at about 100x the cost of accessing a...