RFR: 8311207: Cleanup for Optimization for UUID.toString [v14]

Claes Redestad redestad at openjdk.org
Sat Sep 9 07:13:42 UTC 2023


On Sat, 9 Sep 2023 07:08:07 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> 温绍锦 has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   lo | hi => hi | lo
>
> src/java.base/share/classes/java/util/HexDigits.java line 42:
> 
>> 40:      * hex relative to its index, for example:<p>
>> 41:      * <pre>
>> 42:      *       0 -> '00' -> '0' | ('0' << 8) -> 0x3030
> 
> AFAICT this is now a copy of `StringLatin1::PACKED_DIGITS`, which might be fine. The comment to `StringLatin1::PACKED_DIGITS` seem wrong, though? I think that needs a re-examination (in this or in a separate PR)

Perhaps you could extract the `digitPair` method you're adding in #15555 to a separate PR and use that to remove `HexDigits::DIGITS`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14745#discussion_r1320502947


More information about the core-libs-dev mailing list