RFR: 8321279: Implement hashCode() in Heap-X-Buffer.java.template [v5]
Sergey Tsypanov
stsypanov at openjdk.org
Sat Dec 9 22:00:40 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
- 8321279: Add benchmark
- Merge remote-tracking branch 'origin/8321279' into 8321279
- 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>
- Merge branch 'master' into 8321279
- 8321279: Fix hashCode()
- 8321279: Fix hashCode()
- 8321279: Fix build
- 8321279: Fix build
- 8321279: Fix build
- ... and 2 more: https://git.openjdk.org/jdk/compare/98272af9...9a17af63
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16992/files
- new: https://git.openjdk.org/jdk/pull/16992/files/5a1491a1..9a17af63
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16992&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16992&range=03-04
Stats: 41899 lines in 619 files changed: 17624 ins; 22509 del; 1766 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