The Artima Developer Community
Sponsored Link

Java Community News
Charles Nutter on JRuby Performance

1 reply on 1 page. Most recent reply: Apr 5, 2007 6:56 PM by Joao Pedrosa

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Charles Nutter on JRuby Performance Posted: Apr 5, 2007 5:53 PM
Reply to this message Reply
Summary
In a recent blog post, JRuby project lead Charles Nutter gives an update on JRuby performance and compatibility.
Advertisement

The JRuby project has picked up a lot of steam since Charles Nutter and Thomas Enabo joined Sun last year to work full-time on turning the JVM into one of the best-performing Ruby runtimes. Anticipating an upcoming JRuby 1.0 release, Nutter recently summarized the current state of JRuby performance and compatibility in ActiveRecord 100%, Performance Doubling, Java Support Improving.

Since Rails is arguably the most popular Ruby framework, the JRuby project has been aiming to provide full compatibility for Rails applications. Nutter notes that ActiveRecord, Rails' object-relational framework, posed the biggest challenges, and that recent JRuby builds finally support ActiveRecord:

The module with the most failures has always been ActiveRecord. It's the most complicated and the weakest point in the JRuby on Rails story... Until now:

1031 tests, 3839 assertions, 0 failures, 0 errors

That's zero failures and zero errors when running against MySQL, but it's certainly a de-facto standard in the Rails world. The next step is to get as many other databases to 0/0 as possible. And those are much smaller steps than this first one... It also means that overall Rails support is well into the 99% range and still climbing.

Nutter also reports on performance improvements that in current JRuby builds exceed the native Ruby interpreter's performance on some benchmarks:

As a result of all our efforts, the current trunk code is almost another 2X the performance of 0.9.8, released less than a month ago....

There are actually a number of benchmarks running faster than MRI (the C version of Ruby) even when interpreted, showing that we're finally making good on our promise to have interpreted JRuby run as fast as MRI. So it truly does seem that the compiler will be "bonus" performance once we work out the remaining bottlenecks in the system..

Where calling into Java code was previously as bad as twenty times slower than calling Ruby code, it's now a modest two times slower. We expect to improve that further, getting as close to Ruby invocation speed as possible.

Finally, Nutter also comments that JRuby is now getting close to supporting the complete Ruby syntax:

The compiler also supports almost 2X the number of syntactic constructs it did in 0.9.8, and it's getting faster and more stable every day.

With the JRuby 1.0 release in the near future, would you consider running your existing Ruby and Rails applications on JRuby?


Joao Pedrosa

Posts: 114
Nickname: dewd
Registered: Dec, 2005

Re: Charles Nutter on JRuby Performance Posted: Apr 5, 2007 6:56 PM
Reply to this message Reply
As an addendum, here's an interview with the NetBeans Ruby module author, Tor Norbye:
http://platform.netbeans.org/articles/nbm_interview_tor.html

It's great that JRuby is improving so much, to the point of becoming a good alternative to the native implementation of Ruby.

Until some months ago, I was very immersed in Ruby code only, but since then, I've been trying to learn and use JavaScript, a JavaScript library, and the related technologies like "Ajax". JavaScript, in comparison with Ruby, is not that far way from Ruby in some regards, but I find the JavaScript syntax/semantics much more painful, much more verbose, than the Ruby one. But I can stand it somewhat.

After this little experience, I can ascertain that I would follow Ruby anywhere it went, be it in the Java or in the .NET -- even if their implementations weren't perfect.

I think many Ruby addicts would do the same when given a chance. :-)

That said, adopting JRuby as an exclusive platform of Ruby is not on my list for now. But JRuby working great is all the barrier removal guys like me could need for adopting it for real. I already considered Ruby my own "COBOL". Imagine JRuby, then? :-) Maybe JRuby will be the ultimate "COBOL" for me. I say that in a good way, though. :-)

Flat View: This topic has 1 reply on 1 page
Topic: Commons Configuration 1.4 Released Previous Topic   Next Topic Topic: User Interface Testing with Selenium and TestNG


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us