On Thu, May 26, 2011 at 7:13 PM, John Rose <john.r.r...@oracle.com> wrote: > It's probably about the same as GWT+volatile right now; actually there's a > MCS with a memory barrier in the present code. > But since SwitchPoint is a clear pattern it can be optimized in the future. > It's clear the user of a SwitchPoint wants cheap infrequent inter-thread > communication, and volatiles won't give that as easily as an intrinsic known > to the JVM.
Ok, got it. I think I'm going to be structuring JRuby's use of invokedynamic based on a number of flags. Flags, for example, to turn off indy-based const lookup, indirect method call paths (through DynamicMethod.call rather than straight to the real target), and so on. Some combination of these flags will be enabled by default as they get optimized in Hotspot. That should allow having things "on" as they're ready to be on by default. - Charlie _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev