------art_28966_14528413.1151867121740
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 7/2/06, Mauricio Fernandez <mfp / acm.org> wrote:
>
> On Sun, Jul 02, 2006 at 07:38:42AM +0900, Charles O Nutter wrote:
> > Ruby has great potential to make these same kinds of optimizations at
> > runtime, and as I understand it, YARV will do quite a bit of "smart"
> > optimization at runtime.
>
> IIRC it just did use inline caches for ... constant lookup.  No inline
> caches
> for method calls, let alone PICs. And no inlining either.
>
> Some opcodes are (statically) optimized: hardcoded operations are used
> (instead of a full method call) for Fixnum, Float, [String, Array, Hash...
> for
> the opcodes for which they make sense] (tested in roughly that order) if
> the
> corresponding methods have not been redefined (this code invalidation
> wasn't
> implemented last time I read the sources though, but it's been a while).
> And
> IIRC there was also some sort of optimization for Integer#times and some
> other
> methods one often uses in synthetic benchmarks.
>
> But at any rate it was far from doing lots of dynamic optimizations.
>

Well, that's too bad, but many of the optimizations you mention do sound
similar to what we're doing in JRuby. Of course, JRuby has other issues to
tidy up before these optimizations will be very fruitful (like our remaining
yet-to-be-implemented-in-Java native libraries) but it's good to see we're
going down similar paths. We're also planning on doing some mixed-mode JIT,
however, once I find time to work on the compilation side of things. All
told there should be plenty of excellent VM options for Ruby in the future.

-- 
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com

------art_28966_14528413.1151867121740--