More performance explorations
Charles Oliver Nutter
headius at headius.com
Thu May 26 17:18:06 PDT 2011
On Thu, May 26, 2011 at 7:13 PM, John Rose <john.r.rose at 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
More information about the mlvm-dev
mailing list