Looks good. —
I am not quite 100% sure but you could probably replace the null sentinel value with “/“ or opportunistically “[]”, but i cannot quite tell what exactly is an invalid binary name. Anyway that is not important. Paul. > On Apr 30, 2018, at 5:49 AM, Claes Redestad <claes.redes...@oracle.com> wrote: > > Hi, > > please review this patch to enable caching of getCanonicalName and > getSimpleName, repeated calls of which has been reported to be a performance > bottleneck. The caching improves performance of these methods by up to 20x. > > Rather than adding new fields to Class itself, which would have footprint > implications on classes, we can piggy-back on Class$ReflectionData object. > > Webrev: http://cr.openjdk.java.net/~redestad/8187123/open.02/ > Bug: https://bugs.openjdk.java.net/browse/JDK-8187123 > > Thanks! > > /Claes > >