Re: RFR: 8170595: Optimize Class.isAnonymousClass, isLocalClass, and isMemberClass

2016-12-08 Thread Claes Redestad
On 2016-12-08 18:17, Mandy Chung wrote: On Dec 8, 2016, at 3:06 AM, Claes Redestad wrote: http://cr.openjdk.java.net/~redestad/8170595/webrev.04/ Looks good. Thanks! Can you update the synoposis of this issue to include isLocalClass and isMemberClass? Done. /Claes Mandy

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-08 Thread Mandy Chung
> On Dec 8, 2016, at 3:06 AM, Claes Redestad wrote: > > http://cr.openjdk.java.net/~redestad/8170595/webrev.04/ Looks good. Can you update the synoposis of this issue to include isLocalClass and isMemberClass? Mandy

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-08 Thread Claes Redestad
On 2016-12-08 04:30, Mandy Chung wrote: On Dec 2, 2016, at 6:29 AM, Claes Redestad wrote: : http://cr.openjdk.java.net/~redestad/8170595/webrev.03/ This brings significant improvements to some variants: Good to see the significant improvements. I think what isLocalOrAnonymousClass needs pro

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-07 Thread Mandy Chung
> On Dec 2, 2016, at 6:29 AM, Claes Redestad wrote: > > : > http://cr.openjdk.java.net/~redestad/8170595/webrev.03/ > > This brings significant improvements to some variants: Good to see the significant improvements. I think what isLocalOrAnonymousClass needs probably is something like this:

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-07 Thread Joseph D. Darcy
Hello, I think work like this merits some additional test development to make sure the new, faster implementation doesn't introduce any regressions in correctness. From a quick look in the java/lang/Class test directory, I didn't see any existing tests probing the correctness of isAnonymous;

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-02 Thread Claes Redestad
Hi, On 2016-12-01 22:25, Claes Redestad wrote: On 12/01/2016 10:21 AM, Mandy Chung wrote: On Dec 1, 2016, at 9:52 AM, Claes Redestad wrote: Hi, good suggestion, this tidies up a bit while not affecting score: http://cr.openjdk.java.net/~redestad/8170595/webrev.02 I like this better. It ma

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-01 Thread Claes Redestad
On 12/01/2016 10:21 AM, Mandy Chung wrote: On Dec 1, 2016, at 9:52 AM, Claes Redestad wrote: Hi, good suggestion, this tidies up a bit while not affecting score: http://cr.openjdk.java.net/~redestad/8170595/webrev.02 I like this better. It may be useful to add a private isTopLevel Class() f

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-01 Thread Mandy Chung
> On Dec 1, 2016, at 9:52 AM, Claes Redestad wrote: > > Hi, > > good suggestion, this tidies up a bit while not affecting score: > > http://cr.openjdk.java.net/~redestad/8170595/webrev.02 I like this better. It may be useful to add a private isTopLevel Class() for getSimpleBinaryName to ca

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-01 Thread Claes Redestad
Hi, good suggestion, this tidies up a bit while not affecting score: http://cr.openjdk.java.net/~redestad/8170595/webrev.02 Thanks! /Claes On 2016-12-01 17:58, christoph.dr...@freenet.de wrote: Hey, since I created the original mail I hope you don't mind my interest/comments. What

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-01 Thread Claes Redestad
Hi, sadly, avoiding getSimpleBinaryName is where most of the gain comes from, avoiding getSimpleName only improves marginally on the baseline: Benchmark Mode CntScoreError Units Clazz.isAnonymousClass_Anon avgt 10 192.522 ± 33.214 ns/op Clazz.isAnonymous

RE: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-01 Thread christoph . dreis
Hey, since I created the original mail I hope you don't mind my interest/comments. What about using !isArray() && isLocalOrAnonymousClass() &&getSimpleBinaryName0() == null;to increase readability a bit? Thanks for investigating my initial interest on that level! Cheers, Christoph >

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-01 Thread Mandy Chung
Hi Claes, What is the performance difference if this method calls getSimpleBinaryName? Your patch exposes the implementation details and sensitive to the change there, if any. Mandy > On Dec 1, 2016, at 5:38 AM, Claes Redestad wrote: > > Hi, > > due to recent interest to optimize Class.isA