Ruby’s high-water mark may be long past, but fans keep building and have now released version 2.6.0.
Previewed in June last year, Ruby 2.6.0 features an updated Just In Time (JIT) compiler to speed performance of Ruby programs.
To speed performance, Ruby’s JIT – unlike traditional JIT compilers – writes to disk in C code and spawns a common C compiler to generate native code.
The project claims to have achieved performance 1.7 times faster than Ruby 2.5 on the Optcarrot benchmark – although organisers warned this is an experimental feature and that memory intensive workloads might not yet “benefit” from the JIT at this stage.
Debugging has been simplified in 2.6.0. –disable-mjit-support has been added for JIT debugging. The addition means should you experience an error while building a header file for JIT, you can use the disable command to skip building it.
Also updated is RubyVM with the RubyVM::AbstractSyntaxTree module. The module can now parse a Ruby string and return the Abstract Syntax Tree nodes of the code. Like the JIT, Ruby maintainers warned this is experimental and future compatibility of the module might not be maintained.
Full release notes are here.