RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v2]
Shaojin Wen
duke at openjdk.org
Fri Jul 19 20:58:31 UTC 2024
On Fri, 19 Jul 2024 20:18:04 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> share newArray
>
> src/java.base/share/classes/java/lang/StringConcatHelper.java line 371:
>
>> 369: return new String(s1);
>> 370: }
>> 371: byte coder = (byte) (s1.coder() | s2.coder());
>
> Suggestion:
>
> int coder = s1.coder() | s2.coder();
Converting coder to int type requires processing when calling new String(byte[], byte)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20253#discussion_r1684964122
More information about the core-libs-dev
mailing list