RFR: 8335366: Improve String.format performance with fastpath [v7]
David Schlosnagle
duke at openjdk.org
Sun Jun 30 15:01:19 UTC 2024
On Sun, 30 Jun 2024 14:57:26 GMT, David Schlosnagle <duke at openjdk.org> wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> laze init for `decimal fast path locale`
>
> src/java.base/share/classes/java/lang/StringFormat.java line 142:
>
>> 140: str = String.valueOf(arg1);
>> 141: coder |= str.coder();
>> 142: arg1 = String.valueOf(str);
>
> nit: `arg1 = String.valueOf(str);` can be avoided by just using `str`:
>
> Suggestion:
>
> arg1 = str = String.valueOf(arg1);
> coder |= str.coder();
alternatively:
Suggestion:
str = String.valueOf(arg1);
coder |= str.coder();
arg1 = str;
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19956#discussion_r1660197249
More information about the core-libs-dev
mailing list