JRuby Roundup: JRuby 1.3 Released, ruby2java, JSR 292 Progress

by Werner Schuster on Jun 09, 2009 |

JRuby 1.3 is now available, and brings many performance improvements and bug fixes. New improvements are the inclusion of Nailgun, faster timeout and others(more detailed information of the changes in 1.3 such as Nailgun or dropped Java 1.4 support).

JRuby 1.3 is also the first stable release that works with Google AppEngine's Java support.

There seems to be an issue with the new version of timeout). The issue is fixed in JRuby's trunk version. There are workarounds, such as building JRuby from trunk, but a 1.3.1 release with a fix might become available too.

Meanwhile, the work on improving JRuby's speed continues. One project to improve compiled JRuby is ruby2java:

The Ruby2Java compiler inspects the *runtime* definition of classes to produce a normal-looking Java class. All metaprogrammed methods are reflected on the Java class, as are runtime modifications to those methods.

The ruby2java project is hosted at Kenai. Ruby2java requires at least JRuby 1.3 to work.

Ruby2java aims to improve JRuby speed on currently existing JVMs. However, some new changes in the JDK/Java 7 might allow some more significant improvements in efficiency. JSR-292 collects the first few changes to the JVM to achieve this goal.
One change is the introduction of a new bytecode invokedynamic, which allows to provide custom lookup methods for a call site, ie. if a message is sent to a receiver, the language runtime is invoked to handle the lookup and return the actual method to execute. While this might not bring major improvements in itself, the idea is that JVMs could provide better optimizations for these types of call sites.
This approach has been discussed for years, but it's slowly becoming real. Some talks at JavaOne'09 were dedicated to JSR-292: Towards a Renaissance VM (link to online version of slides) and JSR 292 Cookbook (link to online version of slides). The two talks discuss the changes in depth and also provide ideas for future changes to the JVM.

Charles Nutter also made progress in using using invokedynamic and the new method handles in JRuby, an early version of the code is available in a JRuby branch.
The new features are only available on research versions of the JVM or early JDK 7 builds (invokedynamic landed in the JDK 7 tree a few weeks ago).

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

General Feedback
Marketing and all content copyright © 2006-2016 C4Media Inc. hosted at Contegix, the best ISP we've ever worked with.
Privacy policy

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.