Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v3]

2021-02-12 Thread Philippe Marschall
On Wed, 10 Feb 2021 21:58:02 GMT, Brian Burkhalter wrote: >> That would be possible. It would help in cases where a large Reader is read >> into one or several relatively small off-heap CharBuffers, requiring >> multiple #read calls. This can only be done when the caller is able to work >> wit

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v3]

2021-02-10 Thread Brian Burkhalter
On Tue, 9 Feb 2021 14:08:10 GMT, Philippe Marschall wrote: >> src/java.base/share/classes/java/io/Reader.java line 198: >> >>> 196: } else { >>> 197: int remaining = target.remaining(); >>> 198: char cbuf[] = new char[Math.min(remaining, >>> TRANSFER_BUFFER_SIZE

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v3]

2021-02-09 Thread Philippe Marschall
On Tue, 5 Jan 2021 18:10:52 GMT, Brian Burkhalter wrote: >> Philippe Marschall has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update copyright years > > src/java.base/share/classes/java/io/Reader.java line 198: > >> 196: } else

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v3]

2021-02-08 Thread Brian Burkhalter
On Tue, 5 Jan 2021 17:44:20 GMT, Philippe Marschall 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#r

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v3]

2021-01-05 Thread Philippe Marschall
> 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_SIZ