[concurrency-interest] AtomicReferenceArray.get() and intrinsics method inlining

Manuel Dominguez Sarmiento mads at renxo.com
Thu Jan 16 15:57:29 EST 2020

Repeated the test on 8u241 ... the issue is GONE
Also, testing the forked ConcurrentHashMapV8, performance is now 
up-to-par with stock Java8 ConcurrentHashMap.

Seems JDK-8221355 was the culprit.
Thanks Aleksey!

> On 1/16/20 9:28 PM, Manuel Dominguez Sarmiento wrote:
>> We used Oracle JDK 1.8.0_212 on Mac OS X to produce the reported results. Update 212 is from April
>> 2019 so it's not that old anyway.
> Wait, now *that* sounds familiar.
> Plus the original observation:
>> After careful studying of stock Java8 ConcurrentHashMap.get(), we found that the reason why that
>>   method was being successfully inlined is the (tab = table) != null check before tabAt() is
>> invoked. Apparently, the HotSpot compiler is unable to inline getObjectVolatile() unless it can
>> verify thatits main argument will always be non-null.
> Suggests this:
>    https://bugs.openjdk.java.net/browse/JDK-8221355
> You should really try up-to-date JDK.

More information about the Concurrency-interest mailing list