RFR: 8321279: Implement hashCode() in Heap-X-Buffer.java.template [v4]
Sergey Tsypanov
stsypanov at openjdk.org
Fri Dec 8 20:44:25 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 two additional commits since the last revision:
- Update src/java.base/share/classes/java/nio/Heap-X-Buffer.java.template
Co-authored-by: ExE Boss <3889017+ExE-Boss at users.noreply.github.com>
- Update src/java.base/share/classes/java/nio/Heap-X-Buffer.java.template
Co-authored-by: ExE Boss <3889017+ExE-Boss at users.noreply.github.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16992/files
- new: https://git.openjdk.org/jdk/pull/16992/files/596d6a10..5a1491a1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16992&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16992&range=02-03
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