On Sun, May 1, 2011 at 1:01 PM, Mark Roos <mr...@roos.com> wrote: > With respect to chaining gwt handles. > > Any thoughts on at what depth the chain should be converted to some other > form of dispatch? > I am currently just letting them build > > In smalltalk it seems that around 10-20 inline tests are about the same as a > hash lookup but I > would think it could be different after the JIT gets to it.
I think it's going to vary widely by how much code is in the target methods, how expensive the test is, how "balanced" the chain is (e.g. most frequently-hit at the front) and so on. Obviously if you have a megamorphic site that's seeing hundreds of methods you wouldn't want to chain GWT to that length. I'm going to write a benchmark with variable-morphology(?) to see where the line is in JRuby. The other question is whether a mostly mono or bimorphic call site should keep those at the head of the chain, speeding up those calls, and just have the IC at the end of the chain as a catch-all. I'm also trying to think of low-cost ways of tracking which branches are getting followed in the chain, so they could potentially be rebalanced periodically. - Charlie _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev