On Thu, 22 Jun 2023 00:13:06 GMT, 温绍锦 <d...@openjdk.org> wrote:

>> By optimizing the implementation of java.lang.Long#fastUUID, the performance 
>> of the java.util.UUID#toString method can be significantly improved.
>> 
>> The following are the test results of JMH: 
>> 
>> Benchmark                     Mode  Cnt      Score      Error   Units
>> UUIDUtilsBenchmark.new       thrpt    5  92676.550 ±  292.213  ops/ms
>> UUIDUtilsBenchmark.original  thrpt    5  37040.165 ± 1023.532  ops/ms
>
> 温绍锦 has updated the pull request incrementally with one additional commit 
> since the last revision:
> 
>   move HEX256 to LongCache

src/java.base/share/classes/java/lang/Long.java line 1233:

> 1231:                 HEX256[i] = (char) (((hi < 10 ? '0' + hi : 'a' + hi - 
> 10) << 8)
> 1232:                         + (lo < 10 ? '0' + lo : 'a' + lo - 10));
> 1233:             }

Did you mean to put this in LongCache and is the intention it be archived or 
are you putting this into its own holder class? Right now it's confusing as 
HEX256 is not read from the archive.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14578#discussion_r1238023213

Reply via email to