Integrated: 4926314: Optimize Reader.read(CharBuffer)
Philippe Marschall
github.com+471021+marschall at openjdk.java.net
Mon Apr 26 17:38:06 UTC 2021
On Thu, 31 Dec 2020 10:10:56 GMT, Philippe Marschall <github.com+471021+marschall at openjdk.org> wrote:
> Implement three optimiztations for Reader.read(CharBuffer)
>
> * Add a code path for heap buffers in Reader#read to use the backing array instead of allocating a new one.
> * Change the code path for direct buffers in Reader#read to limit the intermediate allocation to `TRANSFER_BUFFER_SIZE`.
> * Implement `InputStreamReader#read(CharBuffer)` and delegate to `StreamDecoder`.
> * Implement `StreamDecoder#read(CharBuffer)` and avoid buffer allocation.
This pull request has now been integrated.
Changeset: 65c19c40
Author: Philippe Marschall <philippe.marschall at gmail.com>
Committer: Brian Burkhalter <bpb at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/65c19c40
Stats: 371 lines in 6 files changed: 361 ins; 0 del; 10 mod
4926314: Optimize Reader.read(CharBuffer)
Reviewed-by: alanb, bpb
-------------
PR: https://git.openjdk.java.net/jdk/pull/1915
More information about the core-libs-dev
mailing list