Integrated: 8321279: Implement hashCode() in Heap-X-Buffer.java.template
Sergey Tsypanov
stsypanov at openjdk.org
Wed Dec 13 09:12:50 UTC 2023
On Wed, 6 Dec 2023 13:31:02 GMT, Sergey Tsypanov <stsypanov at openjdk.org> wrote:
> Currently `Heap*Buffer.hashCode()` is inherited from `*Buffer` and implemented as
>
> public int hashCode() {
> int h = 1;
> int p = position();
> for (int i = limit() - 1; i >= p; i--)
> h = 31 * h + (int)get(i);
> return h;
> }
>
> This can be improved using `ArraysSupport.vectorizedHashCode()`
This pull request has now been integrated.
Changeset: 8a0a6f8c
Author: Sergey Tsypanov <stsypanov at openjdk.org>
Committer: Alan Bateman <alanb at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/8a0a6f8c252082050c3714d9c14ad2972ac97ecf
Stats: 13 lines in 2 files changed: 12 ins; 0 del; 1 mod
8321279: Implement hashCode() in Heap-X-Buffer.java.template
Reviewed-by: alanb, bpb
-------------
PR: https://git.openjdk.org/jdk/pull/16992
More information about the nio-dev
mailing list