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.

-- 
Mauricio Fernandez  -   http://eigenclass.org   -  singular Ruby