On Mon, 27 Jan 2025 00:22:42 GMT, Chen Liang <li...@openjdk.org> wrote:

>> 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.

It is interesting to note that that DigitList, which I think is the only 
remaining consumer of BinaryToAsciiBuffer reparses the string to separate the 
exponent and the mantissa. The converter has those separately and getChars does 
work to stick them together into a string. If the removal of the thread local 
has a noticeable performance impact, there is an opportunity to eliminate some 
allocations by having DigitList access the exponent and mantissa directly from 
the converter without needing toJavaFormatString

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23311#discussion_r1931546904

Reply via email to