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

Brian Burkhalter bpb at openjdk.org
Thu Apr 13 20:19:40 UTC 2023


On Thu, 13 Apr 2023 20:02:02 GMT, ExE Boss <duke at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8305811: Add microbenchmark
>
> src/java.base/share/classes/java/nio/Heap-X-Buffer.java.template line 316:
> 
>> 314: #if[rw]
>> 315:         if (csq instanceof StringBuilder sb)
>> 316:             return append(sb, start, end);
> 
> Maybe try re‑adding variants for `StringBuffer` and `String` here in order to avoid substring allocations, and see if `CharBufferAppend.appendSubString` and `CharBufferAppend.appendSubStringBuffer` performance improves?

I'll check it out.

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

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


More information about the nio-dev mailing list