JRuby 1.7.0 Released: Defaults to Ruby 1.9 Mode, Can Use InvokeDynamic
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?