RFR (XS) 8076759: AbstractStringBuilder.append(...) should ensure enough capacity for the upcoming "trivial" append calls
Aleksey Shipilev
aleksey.shipilev at oracle.com
Tue May 5 08:31:37 UTC 2015
Hi Roger,
On 05/01/2015 08:19 PM, Roger Riggs wrote:
> Is there any additional benefit by rounding up the next multiple of 4 or 8.
> That would avoid a few wasted bytes at the end of the buffer modulo the
> allocation size.
It does not seem to help any further. Tried "plus32-round8", as in:
http://cr.openjdk.java.net/~shade/8076759/patches.txt
...and it performs similar to "plus32":
http://cr.openjdk.java.net/~shade/8076759/data-foot.png
http://cr.openjdk.java.net/~shade/8076759/data-perf.png
> Otherwise, looks fine to me also.
I actually wonder if my change in ensureCapacity Javadoc requires a CCC?
On that topic, I also tempted to remove the implementation details from
the Javadoc there, since it does not play well with "describe what you
will do, not how would you do it".
Thanks,
-Aleksey.
More information about the core-libs-dev
mailing list