RFR: 8163370: Reduce number of classes loaded by common usage of java.lang.invoke
claes.redestad at oracle.com
Wed Aug 10 15:20:26 UTC 2016
On 2016-08-10 17:07, Aleksey Shipilev wrote:
> On 08/09/2016 03:04 PM, Claes Redestad wrote:
>> please review this set of small changes to reduce the number of classes
>> defined and pulled in when initializing java.lang.invoke
>> Webrev: http://cr.openjdk.java.net/~redestad/8163370/webrev/
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8163370
> I'm too late here, but the change in StringConcatFactory code style is
> for the worse, IMO. Having a switch over enum does add readability. You
> might get the same class-count reduce effect by exposing the
> RecipeElement.tag as byte/int and switching over it.
Not sure I agree on readability, but using a int/byte works for me. Do
we expect the number of tags to increase over time?
If you insist I have a few other startup-oriented micro-optimizations
I'd like to try out on StringConcatFactory (mostly silly things). I
could create an RFE for that and reverse switch-cases into that.
More information about the core-libs-dev