On Sat, 24 Jun 2023 05:24:24 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> Using `ByteArrayLittleEndian` is simpler and faster. >> >> `make test TEST="micro:java.util.zip.ZipFileOpen"`: >> >> >> Benchmark (size) Mode Cnt Score Error >> Units >> - ZipFileOpen.openCloseZipFile 512 avgt 15 39052.832 ± 107.496 >> ns/op >> + ZipFileOpen.openCloseZipFile 512 avgt 15 36275.539 ± 663.193 >> ns/op >> - ZipFileOpen.openCloseZipFile 1024 avgt 15 77106.494 ± 4159.300 >> ns/op >> + ZipFileOpen.openCloseZipFile 1024 avgt 15 71955.013 ± 2296.050 >> ns/op > > @LanceAndersen This one is going to require checking that startup isn't > impacted. @AlanBateman @jaikiran Sorry, I thought about its possible impact on startup time, but I don't know which tests can be used to test JVM startup time. Can you tell me some relevant tests? In fact, I now have a branch(https://github.com/openjdk/jdk/commit/30289cc48c36bd7a59d6c707118d74383bf5f378) that rewrites `ByteArray` and `ByteArrayLittleEndian` to avoid using `VarHandle` because I hope to be able to use them more inside the JDK later. I tested its performance with the `-Xint` option on and it is indeed faster than `VarHandle` in interpreter mode. But I think I'm missing some benchmark results of the impact on startup time to justify its necessity. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14632#issuecomment-1605281589