RFR: 8321279: Implement hashCode() in Heap-X-Buffer.java.template [v7]
Alan Bateman
alanb at openjdk.org
Tue Dec 12 20:23:35 UTC 2023
On Tue, 12 Dec 2023 08:01:47 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()`
>
> Sergey Tsypanov has updated the pull request incrementally with one additional commit since the last revision:
>
> 8320971: Rename method
I think this looks okay. @bplb may want to review it too.
-------------
Marked as reviewed by alanb (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16992#pullrequestreview-1778371394
More information about the nio-dev
mailing list