Re: RFR: 8160302: Reduce number of lambdas created when loading java.util.regex.Pattern

2017-02-02 Thread Claes Redestad
Sherman, Martin, Maurizio, thanks for reviews and suggestions! I've filed https://bugs.openjdk.java.net/browse/JDK-8173820 to deal with this cleanup at a later date. /Claes On 02/02/2017 01:39 AM, Maurizio Cimadamore wrote: On 01/02/17 21:12, Claes Redestad wrote: As tests have been thoro

Re: RFR: 8160302: Reduce number of lambdas created when loading java.util.regex.Pattern

2017-02-01 Thread Xueming Shen
+1 On Feb 1, 2017, at 9:00 AM, Claes Redestad wrote: Hi, changes to java.util.regex in 9+119 has been cause for a number of startup regressions due to early use of lambdas, which has both helped motivate work to reduce the overall cost of lambda initialization[1], while in other cases the use o

Re: RFR: 8160302: Reduce number of lambdas created when loading java.util.regex.Pattern

2017-02-01 Thread Maurizio Cimadamore
On 01/02/17 21:12, Claes Redestad wrote: As tests have been thoroughly run on this and time is running out, I'd prefer contemplating cleaner/nicer ways of writing this particular patch for 10 if you don't mind. I believe an enum could do quite well in this particular situation - when we revis

Re: RFR: 8160302: Reduce number of lambdas created when loading java.util.regex.Pattern

2017-02-01 Thread Martin Buchholz
Looks good to me! On Wed, Feb 1, 2017 at 1:12 PM, Claes Redestad wrote: > Hi Martin! > > On 2017-02-01 20:48, Martin Buchholz wrote: > >> I agree with the startup improvement goal. >> The need to do: >> >> + case "ALPHA": return ALPHABETIC(); >> >> is pretty horrible (but we do worse in the name

Re: RFR: 8160302: Reduce number of lambdas created when loading java.util.regex.Pattern

2017-02-01 Thread Claes Redestad
Hi Martin! On 2017-02-01 20:48, Martin Buchholz wrote: I agree with the startup improvement goal. The need to do: + case "ALPHA": return ALPHABETIC(); is pretty horrible (but we do worse in the name of performance). We'd like to be able to simply do: return Character::isAlphabetic; but probab

Re: RFR: 8160302: Reduce number of lambdas created when loading java.util.regex.Pattern

2017-02-01 Thread Martin Buchholz
I agree with the startup improvement goal. The need to do: +case "ALPHA": return ALPHABETIC(); is pretty horrible (but we do worse in the name of performance). We'd like to be able to simply do: return Character::isAlphabetic; but probably we're stymied by hotspot's eagerness being p

RFR: 8160302: Reduce number of lambdas created when loading java.util.regex.Pattern

2017-02-01 Thread Claes Redestad
Hi, changes to java.util.regex in 9+119 has been cause for a number of startup regressions due to early use of lambdas, which has both helped motivate work to reduce the overall cost of lambda initialization[1], while in other cases the use of regexes could be reconsidered (VersionProps). While