RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access
Aleksey Shipilev
shade at openjdk.org
Fri May 26 08:43:02 UTC 2023
On Fri, 26 May 2023 06:47:29 GMT, Hannes Greule <duke at openjdk.org> wrote:
>> src/java.base/share/classes/java/util/UUID.java line 286:
>>
>>> 284: long lsb = 0;
>>> 285: for (int i = start; i < start + 8; i++) {
>>> 286: msb = (msb << 8) | (data[i] & 0xff);
>>
>> Can we use VarHandle/ByteBuffer to read 64 bits at a time?
>
> `jdk.internal.util.ByteArray` has VarHandle-based methods ready for that
Yes, I have that optimization in the pipeline, and wanted to do so separately. I can still fold it here, let me see.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14135#discussion_r1206431718
More information about the core-libs-dev
mailing list