RFR: 8365832: Refactor FloatingDecimal
Chen Liang
liach at openjdk.org
Wed Aug 20 07:40:24 UTC 2025
On Sun, 26 Jan 2025 23:42:24 GMT, Shaojin Wen <swen at openjdk.org> wrote:
>> 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.
Each `BinaryToASCIIBuffer` allocates an array for digits. That might be why the buffer was added. @rgiulietti might decide if this removal is fine or if we should keep it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23311#discussion_r1929902085
More information about the core-libs-dev
mailing list