RFR: 8152074: Avoid lambda usage in StringConcatFactory initializer

Claes Redestad claes.redestad at oracle.com
Thu Mar 17 07:10:49 UTC 2016



On 2016-03-17 08:05, Aleksey Shipilev wrote:
> On 17.03.2016 09:50, Claes Redestad wrote:
>> please review this patch to remove lambda usage in the
>> StringConcatFactory initializer, which saves some parts of
>> java.lang.invoke infrastructure initialization for later.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8152074
>> Webrev: http://cr.openjdk.java.net/~redestad/8152074/webrev.01/
> Thanks for doing it! The patch is fine as it is.

Thanks!

>
> Is there any performance benefit in keeping the single PrivilegedBlock
> though? I.e. convert the lambda to anonymous class, and be done with it?

I haven't measured it thoroughly, but I've noticed anonymous classes
can linger, so it looks marginally better when measuring early retained
footprint while the startup/execution cost either way seems negligible.

/Claes



More information about the core-libs-dev mailing list