RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v3]

Aleksey Shipilev shade at openjdk.org
Fri May 26 15:05:59 UTC 2023


On Fri, 26 May 2023 12:01:50 GMT, Andrei Pangin <apangin at openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fine-tune exceptions
>
> src/java.base/share/classes/java/util/UUID.java line 226:
> 
>> 224:                 // set variant to IETF
>> 225:                 msb = (msb & (0x3FFF_FFFF_FFFF_FFFFL)) | 0x8000_0000_0000_0000L;
>> 226:                 return new UUID(lsb, msb);
> 
> Doesn't `msb` [come first](https://github.com/openjdk/jdk/blob/deddaa6ea61f85e9822982a37dad51ff4310457b/src/java.base/share/classes/java/util/UUID.java#L314)?

Yes. Swapped.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14135#discussion_r1206925415


More information about the core-libs-dev mailing list