On Fri, 26 May 2023 08:39:10 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
>> src/java.base/share/classes/java/util/UUID.java line 260: >> >>> 258: buf[c + 8] &= 0x3f; /* clear variant */ >>> 259: buf[c + 8] |= (byte) 0x80; /* set to IETF >>> variant */ >>> 260: } >> >> I'm not sure I understand the point about initialization. Why not just >> setting the required version bits right in UUID constructor without updating >> the array? This will be faster and simpler IMO. > > Right, we can do things straight on locals, without ever touching the heap, > let's see... Yup, that works beautifully. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14135#discussion_r1206499212