RFR: 8322770: Implement C2 VectorizedHashCode on AArch64 [v2]
Mikhail Ablakatov
duke at openjdk.org
Wed Aug 21 14:53:09 UTC 2024
On Tue, 20 Aug 2024 15:33:16 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Mikhail Ablakatov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>>
>> 8322770: AArch64: C2: Implement VectorizedHashCode
>>
>> The code to calculate a hash code consists of two parts: a stub method that
>> implements a vectorized loop using Neon instruction which processes 16 or 32
>> elements per iteration depending on the data type; and an unrolled inlined
>> scalar loop that processes remaining tail elements.
>>
>> [Performance]
>>
>> [[Neoverse V2]]
>> ```
>> | 328a053 (master) | dc2909f (this) |
>> ----------------------------------------------------------------------------------------------------------
>> Benchmark (size) Mode Cnt | Score Error | Score Error | Units
>> ----------------------------------------------------------------------------------------------------------
>> ArraysHashCode.bytes 1 avgt 15 | 0.805 ? 0.206 | 0.815 ? 0.141 | ns/op
>> ArraysHashCode.bytes 10 avgt 15 | 4.362 ? 0.013 | 3.522 ? 0.124 | ns/op
>> ArraysHashCode.bytes 100 avgt 15 | 78.374 ? 0.136 | 12.935 ? 0.016 | ns/op
>> ArraysHashCode.bytes 10000 avgt 15 | 9247.335 ? 13.691 | 1344.770 ? 1.898 | ns/op
>> ArraysHashCode.chars 1 avgt 15 | 0.731 ? 0.035 | 0.723 ? 0.046 | ns/op
>> ArraysHashCode.chars 10 avgt 15 | 4.359 ? 0.007 | 3.385 ? 0.004 | ns/op
>> ArraysHashCode.chars 100 avgt 15 | 78.374 ? 0.117 | 11.903 ? 0.023 | ns/op
>> ArraysHashCode.chars 10000 avgt 15 | 9248.328 ? 13.644 | 1344.007 ? 1.795 | ns/op
>> ArraysHashCode.ints 1 avgt 15 | 0.746 ? 0.083 | 0.631 ? 0.020 | ns/op
>> ArraysHashCode.ints 10 avgt 15 | 4.357 ? 0.009 | 3.387 ? 0.005 | ns/op
>> ArraysHashCode.ints 100 avgt 15 | 78.391 ? 0.103 | 10.934 ? 0.015 | ns/op
>> ArraysHashCode.ints 10000 avgt 15 | 9248.125 ? 12.583 | 1340.644 ? 1.869 | ns/op
>> ArraysHashCode.multibytes 1 avgt 15 | 0.555 ? 0.020 | 0.559 ? 0.020 | ns/op
>> ArraysHashCode.multibytes 10 avgt 1...
>
> src/hotspot/share/utilities/intpow.hpp line 29:
>
>> 27: #define SHARE_UTILITIES_INTPOW_HPP
>> 28:
>> 29: #include "metaprogramming/enableIf.hpp"
>
> There's no need for any of this metaprogramming. A constexpr function would be better.
Replied in another thread: https://github.com/openjdk/jdk/pull/18487/files/4c6812f63bf9a6d5cf17c7899fe4a77e390c1645#r1725193686
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18487#discussion_r1725196617
More information about the hotspot-dev
mailing list