From: Charles Oliver Nutter Date: 2007-01-19T01:57:09+09:00 Subject: Re: Ruby 2.0 joint Ruby/Perl/Python backend ? micathom wrote: >> s/Perl/Java/ and you have Java, JRuby and Jython running on the Java >> Virtual Machine. > > I think there is a difference between having an interpreter running in > the jvm running ruby code or ruby source code being translated/compiled > to bytecode running in a vm (maybe using a JIT compiler) -- and the jvm > is AFAIK rather java centric. Jython already compiles to bytecode. I've been working on JRuby's compiler, and it's going very well. There's not really anything about the JVM that would prevent these languages from getting compiled to bytecode, and there are plans to expand/improve the JVM to make it easier to do so. As an example, here's a fib(34) benchmark running under Ruby 1.8.5 and in JRuby trunk with my prototype JIT compiler enabled: (the "compiled" line is logging from JRuby's JIT) ~/NetBeansProjects/jruby$ ruby test/bench/bench_fib_recursive.rb 12.740000 1.790000 14.530000 ( 14.531119) 12.800000 1.750000 14.550000 ( 14.557708) ~/NetBeansProjects/jruby$ jruby test/bench/bench_fib_recursive.rb compiled: Object.fib_ruby 8.178000 0.000000 8.178000 ( 8.178000) 7.199000 0.000000 7.199000 ( 7.199000) - Charlie