[intrinsics] performance improvements for the intrinsified version of Objects::hash

Vicente Romero vicente.romero at oracle.com
Sat Mar 16 01:34:21 UTC 2019


and here are the results after removing the volative qualifier from the 
fields:

http://cr.openjdk.java.net/~vromero/intrinsics_benchmark_results/v10/benchmarkResults_intrinsics_all_data_v10.html

I will be sending another results in another iteration with a minor 
change proposed by Maurizio,

Thanks for the feedback so far,
Vicente

On 3/15/19 9:05 AM, Vicente Romero wrote:
>
>
> On 3/15/19 6:05 AM, Aleksey Shipilev wrote:
>> On 3/15/19 3:13 AM, Vicente Romero wrote:
>>> Please see the performance of both implementations for the 
>>> multi-threaded version [1].
>>>
>>> [1]
>>> http://cr.openjdk.java.net/~vromero/intrinsics_benchmark_results/v9/benchmarkResults_intrinsics_all_data_v9.html 
>>>
>> I'd drop "volatile" qualifier from the fields you are reading from. 
>> "volatile" (acquire) semantics
>
> will do, thanks for checking this
>> probably breaks some optimizations, and might not be the 
>> overwhelmingly common case for hashCode
>> computations. JMH breaks the folding across @Benchmark calls already. 
>> It might not matter that much
>> for the tests where you read all the fields and then call into 
>> Objects.hash, but better be safe than
>> sorry.
>>
>> -Aleksey
>>
> Vicente



More information about the amber-dev mailing list