BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

JRuby 1.7.0 Released: Defaults to Ruby 1.9 Mode, Can Use InvokeDynamic

by Mirko Stocker on Oct 25, 2012 |

Five months after the first preview release (see InfoQ's coverage) and a second preview release later, the final version of JRuby 1.7.0 has now been released.

The most notable change of JRuby 1.7 is that Ruby 1.9.3 is now the default runtime mode, but it also still supports 1.8.7. While many 1.9 incompatibilities were fixed, it doesn't yet completely support all of Ruby 1.9. From the release notes

We know that there are still pieces of 1.9 support we don’t have yet, like Ripper, but we are at a stable point where people can use JRuby in 1.9 mode to host production applications. At this point, we plan on putting out point releases of 1.7.x every 2-3 weeks for the foreseeable future. These point releases will be made to address any reported problems users run into; and also to fill out the few missing 1.9 libraries not yet finished.

Support for Java 5 has been dropped, and Rubygems and Rake were updated to 1.8.24 and 0.9.2.2, respectively.

JRuby 1.7 now also makes use of Java 7's invokedynamic, but unlike the first preview release, it is now turned off by default. The JRuby wiki explains why: 

[..] current released versions of OpenJDK 7 sometimes error out or fail to optimize code as well as they should. In order to provide a consistent JRuby experience, the use of invokedynamic is off by default on Java 7.

For applications that do not run into the errors or degraded performance, invokedynamic is recommended for maximum performance. It can be forcibly enabled by passing -Xcompile.invokedynamic=true to JRuby (or in JRUBY_OPTS) or by setting the jruby.compile.invokedynamic=true property at the JVM level.

On Java 8 builds of the JVM invokedynamic is enabled by default.

Have you tried JRuby 1.7 with invokedynamic enabled? How much did the performance improve in your applications?

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

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT