RFR: 8305811: (bf) Improve heap buffer performance of CharBuffer::append(CharSequence)
Alan Bateman
alanb at openjdk.org
Tue Apr 11 19:17:33 UTC 2023
On Tue, 11 Apr 2023 00:11:50 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Use the `getChars` method of `String`, `StringBuffer`, and `StringBuilder` to load the chars directly into the array of the heap buffer.
> `CharBuffer` and ... are effectively already handled by `put` methods so the main benefit here would be for the other types.
If the parameter is another CB backed by a char[] then it could be optimised to a System.arraycopy.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13415#issuecomment-1503965493
More information about the nio-dev
mailing list