The Cost of Contention

Martin Thompson first reported on the cost of contention using a simple benchmark that measures the time to increment a 64-bit counter 500 million times using various strategies. Results were reported hereĀ (section 3.1) and here (Managing Contention vs. Doing Real Work). I re-implemented this benchmark here. https://gist.github.com/nikolaybotevb/bc8cc1cdfa2f7cc212a915c487771d53 The results I observed (running on Java 9… Continue reading The Cost of Contention