RFR: 8334328: Reduce object allocation for FloatToDecimal and DoubleToDecimal [v13]
Shaojin Wen
duke at openjdk.org
Tue Jun 25 17:05:40 UTC 2024
On Tue, 25 Jun 2024 14:47:45 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Utf16 case remove `append first utf16 char`
>
> src/java.base/share/classes/jdk/internal/math/DoubleToDecimal.java line 236:
>
>> 234: dk = -1;
>> 235: }
>> 236: return toDecimal(str, index, Q_MIN, t, dk, fd) - start;
>
> I suggest restoring the original logic like so:
>
> /* subnormal value */
> return (t < C_TINY
> ? toDecimal(str, index, Q_MIN, 10 * t, -1, fd)
> : toDecimal(str, index, Q_MIN, t, 0, fd)) - start;
I like the new implementation, the code is cleaner, is your suggestion to revert to the original version due to smaller changes?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19730#discussion_r1653210427
More information about the core-libs-dev
mailing list