RFR: 8152074: Avoid lambda usage in StringConcatFactory initializer
forax at univ-mlv.fr
Thu Mar 17 08:13:59 UTC 2016
patch is good for me,
another problem with an anonymous class, is that it's a new class that need to be loaded, the corresponding metadata in the VM has to be created,
this adds an extra cost compared to use GetPropertyAction which is already loaded at that point.
----- Mail original -----
> De: "Claes Redestad" <claes.redestad at oracle.com>
> À: "Aleksey Shipilev" <aleksey.shipilev at oracle.com>, "core-libs-dev Libs" <core-libs-dev at openjdk.java.net>
> Envoyé: Jeudi 17 Mars 2016 08:10:49
> Objet: Re: RFR: 8152074: Avoid lambda usage in StringConcatFactory initializer
> 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.
> > 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.
More information about the core-libs-dev