Ruby Lands New "RJIT" Just-In-Time Compiler
Back in 2021 Ruby merged the YJIT just-in-time compiler that last year with Ruby 3.2 was deemed production grade. There's also been the MJIT compiler that relies upon an external C compiler. And now landing this week in Ruby is RJIT as the newest just-in-time effort.
RJIT is intended to replace MJIT and it's a pure-Ruby assembler to generate native code - thus not requiring a C compiler like MJIT at run-time nor a Rust compiler at build-time like with YJIT. RJIT's warmup is currently slower than YJIT but faster than MJIT.
RJIT is generating code similar to YJIT. In major benchmarks RJIT is outperforming MJIT but "nowhere near YJIT" in its current form.
This new JIT compiler for Ruby has been merged via this pull if interested in all the technical details and benchmarks on RJIT.
RJIT is intended to replace MJIT and it's a pure-Ruby assembler to generate native code - thus not requiring a C compiler like MJIT at run-time nor a Rust compiler at build-time like with YJIT. RJIT's warmup is currently slower than YJIT but faster than MJIT.
RJIT is generating code similar to YJIT. In major benchmarks RJIT is outperforming MJIT but "nowhere near YJIT" in its current form.
This new JIT compiler for Ruby has been merged via this pull if interested in all the technical details and benchmarks on RJIT.
13 Comments