[MacRuby-devel] Running the experimental branch

Charles Oliver Nutter charles.nutter at sun.com
Sat Apr 4 20:28:45 PDT 2009


Laurent Sansonetti wrote:
> On Apr 4, 2009, at 7:57 PM, Charles Oliver Nutter wrote:
>> The interesting thing about many of these microbenchmarks is that a 
>> substantial part of MacRuby's performance seems to come from one key 
>> optimization: recursive calls.
> 
> If you're talking about fib or tak, then yes (with of course fast fixnum 
> arithmetic). There are still a few thing that we can do to improve these 
> recursive benchmarks (also I realized I forgot to re-enable the 
> tail-call optimization :-)).
> 
> Last time I benchmarked fib.rb we were able 2 times slower than the 
> equivalent C version (compiled with -O0 though) and this included the 
> startup time + parsing + compilation.

And I have been able to get JRuby's performance within a few times of 
Java performance, provided Java used boxed numerics. I have not put 
those optimizations in place because I could not be sure they were safe 
and I could not get them to pass tests/specs. In the future, that may 
change.

> Now there are other areas that are (and will be further) optimized, such 
> as blocks, lvars/ivars, method dispatch, etc.

I think the primary point I hoped to make was that we would both be 
well-served by exploring these optimizations together and determining 
which are safe and which are not. Most of the optimizations you will be 
able to do on LLVM will be applicable to JRuby on the JVM, and 
vice-versa. We could each go through the pain alone, or we could benefit 
from each other's efforts and discoveries.

- Charlie


More information about the MacRuby-devel mailing list