On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen <d...@openjdk.org> wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with two additional > commits since the last revision: > > - Update src/java.base/share/classes/java/lang/String.java > > Co-authored-by: Chen Liang <li...@openjdk.org> > - add comments src/java.base/share/classes/java/lang/StringConcatHelper.java line 387: > 385: byte[] buf = newArray(newLength); > 386: s1.getBytes(buf, 0, coder); > 387: s2.getBytes(buf, s1.length(), coder); Does s1 length need to be shifted by coder for dstBegin? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20253#discussion_r1685431381