RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream [v3]
Alan Bateman
alanb at openjdk.org
Wed Mar 22 16:45:42 UTC 2023
On Wed, 22 Mar 2023 10:07:57 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> src/java.base/share/classes/java/io/DataInputStream.java line 64:
>>
>>> 62: * working arrays initialized on demand by readUTF
>>> 63: */
>>> 64: private byte[] bytearr;
>>
>> Could the `bytearr` and `chararr` instance variables be removed altogether?
>
> They could but I think that would be under a separate PR. Feel free to raise an issue.
Probably needs an analysis of usages to see if the caching helps or hurts performance. @kuksenko may have opinions on this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13121#discussion_r1145126021
More information about the core-libs-dev
mailing list