RFR: 8365832: Refactor FloatingDecimal
Shaojin Wen
swen at openjdk.org
Wed Aug 20 07:40:24 UTC 2025
On Sun, 26 Jan 2025 17:48:29 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Since FloatToDecimal and DoubleToDecimal are used in Float.toString and Double.toString, some code in FloatingDecimal is not used. This refactoring is to remove the unused code and reuse DecimalDigits to reduce duplication of code.
>
> src/java.base/share/classes/jdk/internal/math/FloatingDecimal.java line 988:
>
>> 986: return threadLocalBinaryToASCIIBuffer.get();
>> 987: }
>> 988:
>
> Why was this thread local buffer removed?
Creating a BinaryToASCIIConverter is not expensive and does not require the use of cache, but this should be proven by performance testing.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23311#discussion_r1929895384
More information about the core-libs-dev
mailing list