Re: RFR: 8055949: ByteArrayOutputStream capacity should be maximal array size permitted by VM

2014-08-29 Thread Martin Buchholz
I decided to care just enough about the last 2x of scalability, but not about the last 8 elements. Your code would resize the 2g elements 8 times before finally reaching MAX_VALUE... Now I'm back in not-caring-anymore mode. At least about MAX_ARRAY_SIZE. On Wed, Aug 27, 2014 at 3:41 AM, Ulf Zibi

Re: RFR: 8055949: ByteArrayOutputStream capacity should be maximal array size permitted by VM

2014-08-27 Thread Ulf Zibis
Am 25.08.2014 um 19:37 schrieb Martin Buchholz: https://bugs.openjdk.java.net/browse/JDK-8055949 http://cr.openjdk.java.net/~martin/webrevs/openjdk9/ByteArrayOutputStream-MAX_ARRAY_SIZE/ The 2x capacity gap was noticed by real users! Hi Martin, the MAX_ARRAY_SIZE code now is copied to many pl

Re: RFR: 8055949: ByteArrayOutputStream capacity should be maximal array size permitted by VM

2014-08-26 Thread Martin Buchholz
I'll submit soonish. @summary second line indented. I added some gratuitous assertions to the test: // check data integrity while we're here byte[] bytes = baos.toByteArray(); if (bytes.length != n) throw new AssertionError("wro

Re: RFR: 8055949: ByteArrayOutputStream capacity should be maximal array size permitted by VM

2014-08-26 Thread Alan Bateman
On 25/08/2014 21:45, Martin Buchholz wrote: : jtreg tests are run by default with -ignore:quiet and there is precedent for other tests with such @ignore statements, and I actually used jtreg -ignore:run to really test this. What I would really like someday is to be able to run expensive test

Re: RFR: 8055949: ByteArrayOutputStream capacity should be maximal array size permitted by VM

2014-08-25 Thread Mike Duigou
This looks fine to me as well. I am fine with the @ignore as I don't suspect anyone would be able to sneak in a change which removed the @ignore without anyone noticing and the comment for why it is marked @ignore seems adequate. Mike On Aug 25 2014, at 13:28 , Alan Bateman wrote: > On 25/08

Re: RFR: 8055949: ByteArrayOutputStream capacity should be maximal array size permitted by VM

2014-08-25 Thread Martin Buchholz
Thanks, Alan. On Mon, Aug 25, 2014 at 1:28 PM, Alan Bateman wrote: > On 25/08/2014 18:37, Martin Buchholz wrote: > > Hi friends of ByteArrayOutputStream, > > I'm trying to clean up an apparent oversight when I tried to fix huge > array resizing back in > 6933217: Huge arrays handled poorly i

Re: RFR: 8055949: ByteArrayOutputStream capacity should be maximal array size permitted by VM

2014-08-25 Thread Alan Bateman
On 25/08/2014 18:37, Martin Buchholz wrote: Hi friends of ByteArrayOutputStream, I'm trying to clean up an apparent oversight when I tried to fix huge array resizing back in 6933217: Huge arrays handled poorly in core libraries https://bugs.openjdk.java.net/browse/JDK-8055949 http://cr.openjd

RFR: 8055949: ByteArrayOutputStream capacity should be maximal array size permitted by VM

2014-08-25 Thread Martin Buchholz
Hi friends of ByteArrayOutputStream, I'm trying to clean up an apparent oversight when I tried to fix huge array resizing back in 6933217: Huge arrays handled poorly in core libraries https://bugs.openjdk.java.net/browse/JDK-8055949 http://cr.openjdk.java.net/~martin/webrevs/openjdk9/ByteArrayOut