RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

Pavel Rappo prappo at openjdk.org
Wed May 29 15:57:02 UTC 2024


On Wed, 29 May 2024 15:50:05 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> @cl4es, here are some results from my machine (macosx-aarch64):
>> 
>> Name                       (size) Cnt     Base    Error      Test    Error  Unit  Change
>> ArraysHashCode.bytes            1  15    0.715 ±  0.004     0.725 ±  0.029 ns/op   0.99x (p = 0.182 )
>> ArraysHashCode.bytes           10  15    3.753 ±  0.024     3.747 ±  0.011 ns/op   1.00x (p = 0.322 )
>> ArraysHashCode.bytes          100  15   69.731 ±  0.157    69.737 ±  0.092 ns/op   1.00x (p = 0.891 )
>> ArraysHashCode.bytes        10000  15 9369.386 ±  1.449  9372.008 ±  6.678 ns/op   1.00x (p = 0.133 )
>> ArraysHashCode.chars            1  15    0.719 ±  0.024     0.734 ±  0.024 ns/op   0.98x (p = 0.076 )
>> ArraysHashCode.chars           10  15    3.744 ±  0.005     3.746 ±  0.004 ns/op   1.00x (p = 0.308 )
>> ArraysHashCode.chars          100  15   69.741 ±  0.112    69.714 ±  0.044 ns/op   1.00x (p = 0.365 )
>> ArraysHashCode.chars        10000  15 9367.123 ±  5.320  9371.325 ±  6.407 ns/op   1.00x (p = 0.046 )
>> ArraysHashCode.ints             1  15    0.711 ±  0.013     0.706 ±  0.006 ns/op   1.01x (p = 0.137 )
>> ArraysHashCode.ints            10  15    3.750 ±  0.002     3.752 ±  0.004 ns/op   1.00x (p = 0.283 )
>> ArraysHashCode.ints           100  15   69.753 ±  0.086    69.711 ±  0.016 ns/op   1.00x (p = 0.065 )
>> ArraysHashCode.ints         10000  15 9376.225 ±  5.845  9376.218 ± 12.181 ns/op   1.00x (p = 0.999 )
>> ArraysHashCode.multibytes       1  15    0.741 ±  0.001     0.740 ±  0.001 ns/op   1.00x (p = 0.038 )
>> ArraysHashCode.multibytes      10  15    2.737 ±  0.001     2.826 ±  0.136 ns/op   0.97x (p = 0.017 )
>> ArraysHashCode.multibytes     100  15   32.202 ±  0.059    32.153 ±  0.006 ns/op   1.00x (p = 0.004*)
>> ArraysHashCode.multibytes   10000  15 4922.740 ± 25.590  4921.468 ±  7.372 ns/op   1.00x (p = 0.846 )
>> ArraysHashCode.multichars       1  15    0.740 ±  0.005     0.740 ±  0.000 ns/op   1.00x (p = 0.996 )
>> ArraysHashCode.multichars      10  15    2.732 ±  0.002     2.737 ±  0.003 ns/op   1.00x (p = 0.000*)
>> ArraysHashCode.multichars     100  15   32.109 ±  0.017    32.182 ±  0.028 ns/op   1.00x (p = 0.000*)
>> ArraysHashCode.multichars   10000  15 4925.750 ± 46.366  4930.684 ± 26.001 ns/op   1.00x (p = 0.704 )
>> ArraysHashCode.multiints        1  15    0.740 ±  0.000     0.739 ±  0.000 ns/op   1.00x (p = 0.000*)
>> ArraysHashCode.multiints       10  15    2.919 ±  0.002     2.953 ±  0.059 ns/op   0.99x (p = 0.033 )
>> ArraysHashCode.multiints      100  15   32.140 ±  ...
>
> Just to clarify, the above comparison is between master and https://github.com/openjdk/jdk/pull/19414/commits/534ff367bc50ec4150e4b206ce7203c7ff9f5cad.

> For clarity, if you think it helps:

I did that and a little bit more in https://github.com/openjdk/jdk/pull/19414/commits/534ff367bc50ec4150e4b206ce7203c7ff9f5cad.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19414#discussion_r1619130669



More information about the security-dev mailing list