JRuby team lays groundwork for optimizations
August 2, 2010 —
(Page 1 of 2)
Related Search Term(s): Java, Oracle
JavaOne has been moved to coincide with Oracle's annual OpenWorld conference in September, so as a result, the JRuby team at Engine Yard has had a few more months to prepare for their planned release of JRuby 1.6.
Thomas Enebo, co-creator of the JRuby project, said the project has been progressing nicely. As JRuby allows Ruby applications to run on top of a JVM, it includes a few workarounds, such as those to allow JDBC to work with Ruby applications. Version 1.6 is now laying the foundations for the removal of those workarounds, thanks to hooks being placed in the OpenJDK (Java SE 7) that should allow for easier development of interpreters for other languages running on top of the JVM.
“The OpenJDK is going to have support for invoking dynamic dispatch at a byte-code level," said Enebo. "It should be faster, but it's only just now at the phase where they've solidified the things they need to support it. Even if it was only moderately faster, it's a great thing for other languages on the JVM."
That will allow for cleaner dependency injections and more flexibility for the platform to allow developers to do exactly what they want with their Ruby code, he added.
“We can already do all the things ‘invoke dynamic’ allows in our codebase today, but it means we have to generate lots of Java classes to accomplish the same thing," said Enebo. "We end up loading lots of classes, which slows down load time and eats up method inlining budgets. Invoke dynamic is not supposed to be a part of the inline budget, so in theory, things could end up being dramatically faster. So far, however, they've just been a little faster."
Preparing to use the OpenJDK is just one part of a larger optimization plan that begins in version 1.6. Enebo said the team has recently begun working on a new internal representation of JRuby, a lengthy process that will allow for significant performance improvement and optimization down the line.