- https://bugs.openjdk.org/browse/JDK-8321271
- Diff: https://github.com/vlsi/jdk/compare/ce108446ca1fe604ecc24bbefb0bf1c6318271c7...write_bytebuffer
- https://github.com/vlsi/jdk/tree/write_bytebuffer
- https://github.com/vlsi/jdk/blob/write_bytebuffer/test/micro/org/openjdk/bench/java/io/ByteArrayInputStreamTransfer.java
ByteArrayInputStream.transferTo(BufferedOutputStream)
no longer allocates temporary arrays, and it improves performance ~2x for 1MiB inputs.