RFR: 8334328: Reduce object allocation for FloatToDecimal and DoubleToDecimal [v8]
Shaojin Wen
duke at openjdk.org
Fri Jun 21 11:37:10 UTC 2024
On Sun, 16 Jun 2024 21:00:41 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 171:
>
>> 169: /* Using the deprecated constructor enhances performance */
>> 170: @SuppressWarnings("deprecation")
>> 171: static String charsToString(byte[] str, int index) {
>
> This should be named something like `asciiBytesToString` now. Perhaps `ToDecimal.LATIN1` can be renamed `ASCII`, too.
In JDK internal string processing, LATIN1 and UTF16 appear in pairs, so I think LATIN1 is better.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19730#discussion_r1648846026
More information about the core-libs-dev
mailing list