[concurrency-interest] ConcurrentLinkedQueue in Java 5 vs. 6

Ilya Mirsky ilya.mirsky at gmail.com
Sat Apr 7 13:45:57 EDT 2012


Running some benchmarks on a multicore machine (Ultra SPARC T2),
I noticed a significant improvement in performance
of ConcurrentLinkedQueue in Java 6 (1.6.0_23) over Java 5 (1.5.0_14).
 The improvement in high contention scenarios is in a factor of up to 5

I'm curious about the reason for this improvement, as the basic algorithm
is the same (MS queue)...
Examining both of the source files, I noticed that in Java 6 version
there's a use in lazySet in some places,
and direct usage of Unsafe class, instead of AtomicReferenceFieldUpdater in
java 5.

But could this explain the significant improvement, or are there other key

Thanks in advance,
Best Regards,
Ilya Mirsky
<http://www.cs.bgu.ac.il/~mirskyil/>  <http://il.linkedin.com/in/ilyamirsky>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120407/9abe8f9b/attachment.html>

More information about the Concurrency-interest mailing list