devxlogo

Rubinius 1.1 Speeds Up Ruby

Rubinius 1.1 Speeds Up Ruby

Ruby developers have multiple choices when it comes to which implementation of the language they want to run. One of those implementations, Rubinius, has now issued its version 1.1 update, promising performance gains and memory improvements.

Rubinius is an alternative implementation to the “Matz Ruby Implementation,” or MRI, which is named after Ruby’s creator and chief designer, Yukihiro “Matz” Matsumoto. Evan Phoenix, the lead Rubinius developer, sees a number of differences between Rubinius and MRI that developers might want to consider.[login]

“Rubinius can provide a lot more performance than MRI,” Phoenix told InternetNews.com. “We incorporate a JIT compiler to turn Ruby code into high-quality machine code. Performance-wise, we use a number of techniques including a generational garbage collector to improve allocation speed and memory usage.”

Phoenix added that the Rubinius project strives to provide Ruby developers with extensive APIs and information that they can use to analyze how well their program is working and to improve it. That said, the new Rubinius 1.1 release is not tracking the latest Ruby release, but is one version behind.

“Rubinius currently targets 1.8.7,” Phoenix said. “Our next feature release is focused around 1.9.2 and Windows support.” Ruby 1.9.2 was released at the end of August.

Though Rubinius 1.1 isn’t based on the latest version of Ruby, it is tracking the leading edge of the Ruby on Rails development framework. Phoenix noted that Rubinius 1.1 is fully compatible with Rails 3.0, and project developers have been testing Rubinius against the code that will be in Rails 3.1 to be sure that compatibility is maintained.

“Rails matters to Rubinius because lots and lots of Ruby developers use Rails,” Phoenix said. “We strive to provide a unique and powerful environment to run that Ruby code, so we know we need to run Rails well.”

One key way that Rubinius 1.1 aims to improve Ruby is by way of several new performance improvements.

“The block inlining is particularly important because it allows the JIT to generate very fast, efficient machine code for some very common, high-level concepts in Ruby,” Phoenix said. “We also improved a number of core methods, such as ‘String#unpack,’ which is used extensively.”

Looking beyond just pure performance, Phoenix noted that there are features in Rubinius 1.1 that are focused on making developers’ lives easier. The new version offers improved debugging APIs that make it easier for developers to troubleshoot their programs, for instance. Another improvement can be found in the new query agent, which also focuses on developer efficiency.

“The query agent is a generic protocol that the VM (virtual machine) uses to export a lot of internal data, such as performance statistics,” Phoenix said. “It also provides some valuable remote troubleshooting tools, such as the ability to connect to a VM and retrieve backtraces for all threads.”

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist