On Tue, 21 Oct 2025 01:28:50 GMT, Shaojin Wen <[email protected]> wrote:
>> This PR refactors the Double.toHexString method to improve its performance
>> by eliminating the use of StringBuilder and regex operations. The new
>> implementation uses a direct byte array approach to construct the hex string
>> representation, which avoids the overhead of StringBuilder operations and
>> regex pattern matching.
>>
>> Existing tests in `java/lang/Double/ToHexString.java`.
>
> Shaojin Wen has updated the pull request incrementally with one additional
> commit since the last revision:
>
> fix test comment
test/jdk/java/lang/Double/ToHexString.java line 182:
> 180: {"0x1.1p1",
> "4001000000000000"}, // Maximum trailing zeros (all zeros after '1')
> 181: {"0x1.0p1",
> "4000000000000000"}, // Maximum trailing zeros (all zeros after '0')
> 182: {"0x1.01p1",
> "4000100000000000"}, // 1 trailing zero removed
Shouldn't the number of trailing zeros be counting down at this point?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27811#discussion_r2446630172