I’ve wondered Why Rails becomes slow with JIT for a long time. Today, I’m pleased to share my answer to the question in this article, which I spent three years of my life to figure out.

"MJIT Does Not Improve Rails Performance"

As I wrote in Ruby 3.0.0 Release Note and my previous post, we thought:


Ruby 3.0 JIT is the fastest JIT ever for MRI. However, despite Ruby 3.0's big improvement in reducing i-cache misses, it's still not ready for optimizing Rails applications. Stay tuned for Ruby 3.1.

"Is Ruby 3 Actually Three Times Faster?"

Ruby 3 is indeed 3x faster than Ruby 2.0 in a Ruby 3x3 benchmark, Optcarrot:

As proposed…


We focused to improve Rails application performance in Ruby 2.7 JIT, but the last year's assumption was wrong and Ruby 2.7 JIT didn't meet the goal. We'll change the approach for it in Ruby 3.0.

Ruby 2.7 is released!

Merry Christmas! The new Ruby is out. As I've sometimes promised to make performance improvements…

In early 2018, Ruby core team merged JIT compiler infrastructure called “MJIT”, which is created by Vladimir Makarov and uses C compiler to generate native code and loads a shared object file dynamically, along with my JIT compiler that is implemented on MJIT and Ruby 2.5-compatible Virtual Machine.

Fortunately my…

My benchmark tool development was accepted as a Ruby Association Grant 2017 project and completed on March 21st. I’ll show you the details of the project.

benchmark_driver.gem's example usage that outputs a graph:

Project Summary

Here is a copy of the project summary which I sent to Ruby Association:

This project aims…

This month, I merged the Ruby's first JIT compiler.

Then I gave a talk about it yesterday at my company's conference.

As it isn't ultra-fast yet, I haven't shared it deeply until the conference. But some of you guys kindly wrote great articles about it.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store