RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v13]

Claes Redestad redestad at openjdk.org
Sun Nov 13 21:12:21 UTC 2022


On Sat, 12 Nov 2022 02:08:19 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> Also, I'd like to note that C2 auto-vectorization support is not too far away from being able to optimize hash code computations. At some point, I was able to achieve some promising results with modest tweaking of SuperWord pass: https://github.com/iwanowww/jdk/blob/superword/notes.txt http://cr.openjdk.java.net/~vlivanov/superword.reduction/webrev.00/

Intriguing. How far off is this - and do you think it'll be able to match the efficiency we see here with a memoized coefficient table etc?

If we turn this intrinsic into a stub we might also be able to reuse the optimization in other places, including from within the VM (calculating String hashCodes happen in a couple of places, including String deduplication). So I think there are still a few compelling reasons to go the manual route and continue on this path.

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

PR: https://git.openjdk.org/jdk/pull/10847


More information about the hotspot-dev mailing list