On Tue, 8 Apr 2025 18:04:43 GMT, Johannes Graham <d...@openjdk.org> wrote:
> Have you considered removing `reverseBytes` and using `ByteArray` instead of > `ByteArrayLittleEndian`? I tested it on a MacBook M1 Max, and the performance of using reverseBytes + ByteArrayLittleEndian is about 1% faster. Considering that most of us have little-endian machines, ByteArray.setInt/setLong also needs to do reverseBytes. Doing reverseBytes in hex8 requires 4 Long.reverseBytes in a UUID.toString call. If using ByteArray, on a little-endian machine, a UUID.toString call requires 2 Long.reverseBytes and 4 Integer.reverseBytes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22928#issuecomment-2791638162