On Fri, 23 Jun 2023 20:00:12 GMT, Glavo <d...@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
On an existing Java runtime, I had a quick look at the classes loaded at application startup to see if `MethodHandles` already gets loaded before `ZipUtils` (and related jar/zip classes). From what I see in the output, `MethodHandles` indeed is already loaded before `ZipUtils`. So I think this change doesn't bring in any new/unexpected usage of `MethodHandles` that could potentially impact startup performance. P.S: I just noticed Alan has a similar comment about startup performance, so yes, having some numbers for a startup benchmark would be useful. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14632#issuecomment-1605275101