Hi Charlie,

Thanks.

Regards,

Carter.

On Wed, Oct 26, 2011 at 11:29 PM, Charles Oliver Nutter <headius / headius.com
> wrote:

> On Wed, Oct 26, 2011 at 11:56 PM, Carter Cheng <cartercheng / gmail.com>
> wrote:
> > Thanks Charles. I am still somewhat curious about this- I did look at the
> > link for jruby you sent me but I am not sure how JRuby is exploiting the
> JVM
> > framework. Do you have specific JVM's that you feel may be interesting to
> > study? Are most of these OSS in some form or another nowadays? I am
> curious
> > where you do draw the line between the academic theoretical and practical
> > (since many pieces showing up in places like PLDI are descriptions of
> actual
> > projects- like Mozilla SpiderMonkey).
>
> For JVMs I'd recommend reading about Hotspot, the VM inside OpenJDK.
> It is GPL and there's lots of documents about how it optimizes code
> available online. Here's a good place to start:
>
> http://wikis.sun.com/display/HotSpotInternals/PerformanceTechniques
>
> There are certainly many others out there, including formal academic
> papers about Hotspot and other VMs.
>
> JRuby exploits the JVM mostly by simply targeting it. We try to
> produce the lightest-weight bytecode possible, and the JVM takes over
> from there. So JRuby itself isn't *quite* as interesting as the JVM
> would be for your purposes.
>
> The new IR compiler in JRuby that I mentioned may be of more interest,
> since we'll be able to apply traditional compiler optimization
> techniques there.
>
> And as far as academic, theoretical, and practical...I consider
> "practical" to be "something I can use right now." There's lots of
> interesting papers on static optimization for Ruby, runtime type
> inference, and so on...but as far as I know no working implementation
> that utilizes any of those techniques. That's not to say they
> shouldn't be explored...I'm just saying if you want to make an impact
> on MRI performance in the short term, going with a simpler approach at
> first would pay dividends much more quickly.
>
> Of course I don't know what your goals are. You may be interested in
> trying to put the more "academic" approaches to practical use.
>
> - Charlie
>
>