RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v3]

Kieran Farrell kfarrell at openjdk.org
Tue Sep 23 10:06:23 UTC 2025


On Mon, 22 Sep 2025 15:59:19 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> In the meantime,  `SecureRandom.nextLong()` has been implemented.
>> Composing the two longs from the timestamp and the random will take fewer lines of code.
>> 8357915: SecureRandom nextLong memory usage
>
> @kieran-farrell Is there a last-minute plan to make use of `nextLong()` as suggested by @RogerRiggs?
> Otherwise looks good

Thanks @rgiulietti, the need for a nextLong() API existed whenwe were using higher percision bits in the first half of the UUID, there fore only required the second half (long) to be generated with random bits, however we are no longer using higher percision bits in the first ling, and instead using random bits in their place, so we would need to call nextLong twice and overwrite with the timestamp etc. which results in a large perfomance dec.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25303#discussion_r2371795396


More information about the core-libs-dev mailing list