RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe
Glavo
duke at openjdk.org
Mon Jun 10 02:17:25 UTC 2024
Things have changed since https://github.com/openjdk/jdk/pull/14636 was closed, so let me reopen it.
https://github.com/openjdk/jdk/pull/15386 confirmed that `VarHandle` in BALE caused a startup regression. In order to not have any more revert patches, it makes sense to optimize BALE.
The optimization of https://github.com/openjdk/jdk/pull/16245 allows the traditional expression to have good performance, but BA and BALE save us from having to copy these lengthy expressions everywhere. So it makes sense to keep them.
Now here's the question, should I rewrite this PR without `Unsafe`? I'll do some research (e.g. does `Unsafe` have better performance during warmup?), but I'd also like to take some advice.
-------------
Commit messages:
- 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe
Changes: https://git.openjdk.org/jdk/pull/19616/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19616&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8310843
Stats: 683 lines in 3 files changed: 444 ins; 95 del; 144 mod
Patch: https://git.openjdk.org/jdk/pull/19616.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19616/head:pull/19616
PR: https://git.openjdk.org/jdk/pull/19616
More information about the core-libs-dev
mailing list