On 01/16/2013 01:23 PM, Peter Levart wrote: > The test I used is simple: > https://raw.github.com/plevart/lambda-hacks/master/jdk-test/src/org/openjdk/tests/java/util/concurrent/atomic/RandomTest.java
OK, you can't get serious with that test. The failures visible at the surface are: - dead-code elimination for parts of nextInt(): you should consume the results! - thread start/stops are not synchronized; there are significant chances threads are running solo for considerable amount of time. This should be much easier to write once our microbenchmark harness goes into OpenJDK; in the mean time, you will need to invest considerably more time into making this right. -Aleksey.