RFR: 8322770: Implement C2 VectorizedHashCode on AArch64 [v5]
Andrew Haley
aph at openjdk.org
Fri Aug 23 10:41:07 UTC 2024
On Fri, 23 Aug 2024 07:54:02 GMT, Andrew Haley <aph at openjdk.org> wrote:
> if we moved the block length down to 16 we'd get some benefit for typical java `String`s from this patch.
Just to provide some substance, this patch runs at 55.5 cycles for a (Latin1) `String` of 31 chars, and a very creditable 16.5 cycles for 32 chars. If we had 16-wide vectorized hash for byte[] that `String[31].hashCode()` would come down to about 19 cycles, I think.
P.S. `String.hashCode()`uses `Arrays.hashCode internally`, for either `char[]` or `byte[]`, depending on whether all of the chars in the string are between 0...127.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18487#issuecomment-2306811750
More information about the hotspot-dev
mailing list