It seems I may have to write some benchmarks for this then. Just so I understand, the equivalent non-ClassValue-based store would need to:
* Be atomic; value may calculate more than once but only be set once. * Be weak; classes given class values must not be rooted as a result (an external impl like in JRuby or Groovy would have to use weak maps for this). Jochen: Is your class-to-metaclass map usable apart from the Groovy codebase? - Charlie On Mon, Apr 27, 2015 at 11:40 AM, Christian Thalinger <christian.thalin...@oracle.com> wrote: > > On Apr 24, 2015, at 2:17 PM, John Rose <john.r.r...@oracle.com> wrote: > > On Apr 24, 2015, at 5:38 AM, Charles Oliver Nutter <head...@headius.com> > wrote: > > > Hey folks! > > I'm wondering how the performance of ClassValue looks on recent > OpenJDK 7 and 8 builds. JRuby 9000 will be Java 7+ only, so this is > one place I'd like to simplify our code a bit. > > I could measure myself, but I'm guessing some of you have already done > a lot of exploration or have benchmarks handy. So, what say you? > > > I'm listening too. We don't have any special optimizations for CVs, > and I'm hoping the generic code is a good-enough start. > > > A while ago (wow; it’s more than a year already) I was working on: > > [#JDK-8031043] ClassValue's backing map should have a smaller initial size - > Java Bug System > > and we had a conversation about it: > > http://mail.openjdk.java.net/pipermail/mlvm-dev/2014-January/005597.html > > It’s not about performance directly but it’s about memory usage and maybe > the one-value-per-class optimization John suggests is in fact a performance > improvement. Someone should pick this one up. > > — John > _______________________________________________ > mlvm-dev mailing list > mlvm-dev@openjdk.java.net > http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev > > > > _______________________________________________ > mlvm-dev mailing list > mlvm-dev@openjdk.java.net > http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev > _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev