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
src/java.base/share/classes/jdk/internal/util/ByteArrayLittleEndian.java line 150: > 148: public static long getUnsignedInt(byte[] array, int offset) { > 149: return Integer.toUnsignedLong((int) INT.get(array, offset)); > 150: } Hello Glavo, I was going to recommend adding a test method to existing jtreg tests to test these new methods. But it looks like there's no jtreg test for this `ByteArrayLittleEndian` class. Would you mind creating a new test class to (at least) test these methods? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14632#discussion_r1240603525