BT

Your opinion matters! Please fill in the InfoQ Survey!

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

| by Mirko Stocker Follow 0 Followers on Oct 25, 2012. Estimated reading time: 1 minute |

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?

Rate this Article

Adoption Stage
Style

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

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT