<i18n dev> RFR: 8333396: Performance regression of DecimalFormat.format [v5]
Justin Lu
jlu at openjdk.org
Mon Jun 17 18:20:18 UTC 2024
On Fri, 14 Jun 2024 03:28:58 GMT, lingjun-cg <duke at openjdk.org> wrote:
>> I second Justin's suggestion here. The change should benefit every implementation in the JDK, not only NumberFormat. Also, I might suggest renaming the new class, as it is kind of long/redundant. How about using something as simple as "StringBuf"?
>
>> I second Justin's suggestion here. The change should benefit every implementation in the JDK, not only NumberFormat. Also, I might suggest renaming the new class, as it is kind of long/redundant. How about using something as simple as "StringBuf"?
>
> Thanks for your comment. The long name bother me for a while. I have changed it to ""StringBuf".
Hi @lingjun-cg
Thanks for your work here.
While this would benefit the performance of NumberFormat subclasses, we are hoping that if we are going to make the internal switch to StringBuilder, we can also make similar changes to other Format subclasses as well where applicable. So, we would want `isInternalSubclass()` to be defined at the Format level. Some methods that I can immediately think of would be `String DateFormat.format(Date date)`, `String ListFormat.format(List<String> input)` and, `String MessageFormat.format(Object obj)`.
I believe @naotoj shares the same sentiment.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19513#issuecomment-2174040047
More information about the i18n-dev
mailing list