JDK-8352891 Performance improvements to ByteArrayOutputStream
Engebretson, John
jengebr at amazon.com
Fri Apr 11 17:01:26 UTC 2025
There is one form of array builder already in the JDK - Stream.builder(). This doesn't cover off all of the use-cases, but covers some of them (notably not the byte array case).
Thanks for pointing that out! Under-the-covers it relies on java.util.stream.SpinedBuffer, which is built on the same type of segmented structure I suggested. There are some differences and I need to measure some of the performance aspects, but it is definitely aimed at the same type of problem.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250411/08c49e14/attachment.htm>
More information about the core-libs-dev
mailing list