RFR [8054221] StringJoiner imlementation optimization
Ivan Gerasimov
ivan.gerasimov at oracle.com
Tue Aug 5 19:19:15 UTC 2014
>> But if we do that, I think we should optimize size == 0 as well, thus:
>>
>> if (addLen == 0 && size <= 1)
>> return (size == 0) ? "" : elts[0];
> Yes, done.
>
Or we can just call compactElts() if addLenn == 0, so it will work for
any size.
Updated the webrev at the same location:
http://cr.openjdk.java.net/~igerasim/8054221/1/webrev/
Sincerely yours,
Ivan
More information about the core-libs-dev
mailing list