RFR: 8305811: (bf) Improve performance of CharBuffer::append(CharSequence[,int,int]) [v8]

Brian Burkhalter bpb at openjdk.org
Mon Apr 17 15:30:47 UTC 2023


On Sat, 15 Apr 2023 08:16:02 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8305811: Remove fallback to append(CS) when start == 0 and end == csq.length() (caused failure in Appendable/Basic.java)
>
> src/java.base/share/classes/java/nio/Heap-X-Buffer.java.template line 315:
> 
>> 313: #if[rw]
>> 314:         if (csq instanceof StringBuilder)
>> 315:             return appendChars(csq, 0, csq.length());
> 
> No special casing of String here as append(String) as the implementation in the base class uses put(String) so nothing to be gained.
> 
> No special casing of StringBuffer as it is legacy/not-interesting. Also it's caching of the String value means you don't see the difference in micros, is that right?

Comments added in https://github.com/openjdk/jdk/pull/13415/commits/c18565eb822aa96a49169c4fffe9ebe203599356.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13415#discussion_r1168895329


More information about the nio-dev mailing list