RFR: 8321279: Implement hashCode() in Heap-X-Buffer.java.template [v2]
Sergey Tsypanov
stsypanov at openjdk.org
Wed Dec 6 19:08:51 UTC 2023
> 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:
8321279: Fix hashCode()
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16992/files
- new: https://git.openjdk.org/jdk/pull/16992/files/3f3f6dd3..8927a970
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16992&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16992&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/16992.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16992/head:pull/16992
PR: https://git.openjdk.org/jdk/pull/16992
More information about the nio-dev
mailing list