RFR: 8321279: Implement hashCode() in Heap-X-Buffer.java.template [v7]

duke duke at openjdk.org
Sat Aug 3 19:09:46 UTC 2024


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

@stsypanov 
Your change (at version d91925374ba3eaef3203a8d583c56c6a3e5b8485) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/16992#issuecomment-1852797705


More information about the nio-dev mailing list