On Sun, 25 Jun 2023 16:48:06 GMT, 温绍锦 <d...@openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/Long.java line 451:
>> 
>>> 449:     }
>>> 450: 
>>> 451:     static String fastUUID(long lsb, long msb) {
>> 
>> This method should probably have an assert or something that 
>> `COMPACT_STRINGS` is `true`, e.g.:
>> Suggestion:
>> 
>>     static String fastUUID(long lsb, long msb) {
>>         if (!COMPACT_STRINGS) {
>>             throw new InternalError("Long::fastUUID requires compact 
>> strings");
>>         }
>
> it's none-public method, only for UUID.toString

now the fastUUID method codeSize is 325, which is equal to the maximum value of 
FreqInlineSize under aarch64 and x64. if additional assertion is added, the 
method codeSize > 325, cannot be inlined, resulting in performance degradation.

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

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

Reply via email to