RFR: 8306374: (bf) Improve performance of DirectCharBuffer::append(CharSequence[,int,int]) [v2]
Brian Burkhalter
bpb at openjdk.org
Wed Apr 19 16:25:59 UTC 2023
On Wed, 19 Apr 2023 15:39:43 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template line 461:
>>
>>> 459: throw new BufferOverflowException();
>>> 460:
>>> 461: char[] buf = new char[APPEND_BUF_SIZE];
>>
>> Can we do Math.min(length, APPEND_BUF_SIZE) here?
>
> Yes.
So changed in [d81313a](https://github.com/openjdk/jdk/pull/13522/commits/d81313a6404a8cf7f39b3ab532f8c6b2bbd272c1).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13522#discussion_r1171578004
More information about the nio-dev
mailing list