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

Vicente Romero vicente.romero at oracle.com
Fri Mar 15 13:05:35 UTC 2019



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