RFR: 8306374: (bf) Improve performance of DirectCharBuffer::append(CharSequence[,int,int]) [v5]

Brian Burkhalter bpb at openjdk.org
Wed Apr 26 16:08:37 UTC 2023


On Wed, 26 Apr 2023 14:10:20 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>> 
>>  - 8306374: Remove checkSession() from appendChars(); augment test
>>  - Merge
>>  - 8306374: Replace checkFromIndexSize() with checkFromToIndex()
>>  - 8306374: Remove superfluous csq == null check
>>  - 8306374: Add explicit bounds check; allocate less memory if possible
>>  - 8306374: (bf) Improve performance of DirectCharBuffer::append(CharSequence[,int,int])
>
> src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template line 451:
> 
>> 449:     private static final int APPEND_BUF_SIZE = 1024;
>> 450: 
>> 451:     private $Type$Buffer appendChars(CharSequence csq, int start, int end) {
> 
> I assume we don't need to generate for read-only char buffers.

No, of course not. Fixed by 801f361.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13522#discussion_r1178079112


More information about the nio-dev mailing list