On Sat, 12 Nov 2022 02:08:19 GMT, Vladimir Ivanov <vliva...@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

Reply via email to