ruby.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
If you are interested in the Ruby programming language, come join us! Tell us about yourself when signing up. If you just want to join Mastodon, another server will be a better place for you.

Administered by:

Server stats:

1.1K
active users

Jeff McFadden

We turned on yjit in production today and the results feel impossible.

20-40% reduction in request times, with much less variability than we were seeing before.

This is incredible.

Between last week (Ruby 3.0) and this week (Ruby 3.2+yjit), our request times have been cut _in half_.

@mcphat @joeldrapper I know right? It’s like pure magic. We saw a similar request time drop when we enabled it, ~30% or so.

Can’t wait for the improvements in 3.3, it’s looking like we’re getting another solid bump in performance.

@mcphat that’s great. Is this a rails app or some other framework?

@mcphat neat! have you tried 3.2 with and without YJIT (I’m curious if the bump is more about 3.2 or YJIT)

@Schneems Yep — we went 3.0 -> 3.2 (no jit) and let that run for a few days. That was a 20-30% performance improvement.

Then we turned on YJIT and got an _additional_ 20-40% boost on top.

@mcphat @Schneems I’ve got four Rails apps under my watch on 3.0.5. You telling me there’s even a small chance I can 3.2+YJIT and send them through the roof?

I’m already thinking about the deprecation notices and I’m immediately less enthused.

@johlym @mcphat @Schneems 3.0 -> 3.2 didn't deprecate much if anything. I think the biggest breaking change might be File.exists? that need to be changed to File.exist?

The somewhat "hard" one was 2.7 -> 3.0.

@byroot @johlym @Schneems Yea it wasn’t a particularly hard update for us. Some keyword arguments syntax updates in a few spots and a few gem updates. The tooling & deploy pipeline updates might have been the most work. But, even then, relatively easy. YMMV, of course.

@mcphat @byroot @Schneems looking forward to the remaining 2014 idioms popping their heads up and squashing my false sense of confidence 😎

@mcphat I've personally found YJIT to be pretty great for a lot of use cases, but I also know there are currently some edge cases where YJIT will bail and put you back into basic interpreter mode.

For some use cases, I find TruffleRuby native mode to be faster. It's VM makes better use of cores and threads, but it doesn't support forking so there are some things that actually work better on mainline CRuby.

Nice infographic, BTW!