JDK-8352891 Performance improvements to ByteArrayOutputStream
Alan Bateman
alan.bateman at oracle.com
Tue Apr 8 16:04:04 UTC 2025
On 08/04/2025 13:51, Engebretson, John wrote:
>
> Brian, Alan, Markus, Chen – thank you for your feedback on this
> issue! At this point we seem to agree that 1) there is merit to this
> idea, 2) nobody loves a new public class (including me), and 3) this
> is not a subclass of ByteArrayOutputStream. Are we ready to move this
> to CSR and continue the API discussion there?
>
> Thank you very much! 😊
>
>
I think there is agreement that ByteArrayOutputStream.unsynchronized(int
cap) (or some such method) would be useful. It would not require using a
contiguous byte[] as the backing array so there is scope to experiment
with implementations that don't need to resize like the base BAOS does.
Extending BOAS means the size is limited to an int. To go beyond would
be a different API and there is lots of scope to do experiments. I think
too early to create a CSR for MOS, assuming this is what you mean.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250408/758444f7/attachment.htm>
More information about the core-libs-dev
mailing list