RFR: 8334328: Reduce object allocation for FloatToDecimal and DoubleToDecimal [v8]

Shaojin Wen duke at openjdk.org
Sun Jun 16 23:52:42 UTC 2024


On Sun, 16 Jun 2024 21:02:09 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   code format
>
> src/java.base/share/classes/jdk/internal/math/ToDecimal.java line 169:
> 
>> 167:     }
>> 168: 
>> 169:     /* Using the deprecated constructor enhances performance */
> 
> Enhances performance over what, `new String(str, 0, index, StandardCharsets.US_ASCII)`? Please specify.

The previous version of the code is like this, which will affect Float.toString and Double.toString. If changed, it is necessary to add the Benchmark of Float.toString and Double.toString, so I don’t want to change this in this PR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19730#discussion_r1642014965


More information about the core-libs-dev mailing list