Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v5]

2023-03-24 Thread Sergey Tsypanov
On Fri, 24 Mar 2023 16:12:13 GMT, Chen Liang wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8304745: Add benchmark > > test/micro/org/openjdk/bench/java/io/BufferedInputStreamBenchmark.java line 2: > >> 1: /*

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v5]

2023-03-24 Thread Chen Liang
On Fri, 24 Mar 2023 15:40:40 GMT, Sergey Tsypanov wrote: >> By default `BufferedInputStream` is constructed with internal buffer with >> capacity 8192. In some cases this buffer is never used, e.g. when we call >> `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when >> `

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v5]

2023-03-24 Thread Sergey Tsypanov
> By default `BufferedInputStream` is constructed with internal buffer with > capacity 8192. In some cases this buffer is never used, e.g. when we call > `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when > `BufferedInputStream` is cascaded. Sergey Tsypanov has updated