RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v9]
Sergey Tsypanov
stsypanov at openjdk.org
Thu Apr 6 09:59:25 UTC 2023
On Thu, 6 Apr 2023 09:23:33 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> For this change, I think a benchmark isn't necessary - what would it test, how quickly a new BufferedInputStream returns as compared to previous code?
@jaikiran first of all it demonstrates reducing allocation for plain/cascaded readAllBytes() operation. If the question was only about buffer allocation delay the change would be pointless to me.
> So, I think it's OK if we drop the benchmark from this PR, if @stsypanov agrees
I agree. There'd be hardly more changes into buffer allocation, so we needn't meaure it. And if this patch is for some reason reverted then we needn't it either.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13150#issuecomment-1498794845
More information about the core-libs-dev
mailing list