[concurrency-interest] computeIfAbsent optimized for missing entries

Doug Lea dl at cs.oswego.edu
Thu Feb 9 06:51:01 EST 2017


On 02/08/2017 12:22 PM, Benjamin Manes wrote:
> In JDK9, it looks like you added a small prescreening
> <http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java?r1=1.295&r2=1.296>
> to check at the first node in the bin and eagerly return. That seems
> like a smart compromise, given the performance analysis you shared on
> this forum previously that dissuaded you from adopting a full
> pre-screening.

Thanks! I forgot that this made it into jdk9 (vs jdk8).
Amir: for more details see the discussions on this in the
archives: http://cs.oswego.edu/pipermail/concurrency-interest/

-Doug



More information about the Concurrency-interest mailing list