[concurrency-interest] Differences in "optimized" versions of backport

Dawid Kurzyniec dawidk at mathcs.emory.edu
Sat Mar 3 09:39:42 EST 2007


Peter Kovacs wrote:
> Hi,
>
> What are the main differences between versions of the backport
> optimized for Java 1.4 and Java 1.5. One of them is using "native" CAS
> support in Java 1.5 and using some lock-based CAS-proxy in Java 1.4, I
> presume. Any other notable differences?
>   

1. use of native CAS etc. in atomic variables,
2. use of native park/unpark (and CAS) in locks.

This results in a lot faster atomics (circa an order of magnitude), and 
also faster locks (circa 2-5 times). Since atomics and locks are used 
all over the API, performance gains are propagated (although they may be 
less dramatic) to queues, concurrent collections, thread pools, etc.

Disclaimer: I haven't done a comprehensive benchmark; only some sketchy 
comparisons based on stress test timings.

Regards,
Dawid




More information about the Concurrency-interest mailing list