RFR: 8294696 - BufferedInputStream.transferTo should drain buffer when mark set [v5]

Alan Bateman alanb at openjdk.org
Mon Oct 31 09:54:12 UTC 2022


On Mon, 31 Oct 2022 08:28:07 GMT, Markus KARG <duke at openjdk.org> wrote:

> **TL;DR:** Your optimization is now contained in this PR and outperforms the previous code. Nevertheless I plead for Alternative C (double buffering) instead, which is even faster but much simpler.

You had dismissed this previously so it's useful to have results now to compare. I agree it's much simpler, it can probably use Arrays.copyOfRange too.

For the results, can you say what the underlying input stream is and what the target output stream is? Also it would be useful to get a baseline. I suspect you have that, it's just not pasted in the table above.

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

PR: https://git.openjdk.org/jdk/pull/10525


More information about the core-libs-dev mailing list