[concurrency-interest] ConcurrentHashMap footprint and contention improvements

Doug Lea dl at cs.oswego.edu
Fri Apr 15 13:57:28 EDT 2011

On 04/15/11 12:46, Jason Mehrens wrote:
> Should the scanAndLock methods perform an identity check on the key? It seems
> inconsistent with put, get, replace, and remove.

Thanks for the prod. This deserves and will get a comment. scanAndLock*
are designed to be on average slower than scans within main methods.
This also helps warm up equals() method code/accesses.
This gives a very small but measurable overall throughput improvement.


More information about the Concurrency-interest mailing list