alt.hn

5/27/2026 at 4:50:10 PM

A new register allocator for ZJIT

https://railsatscale.com/2026-05-27-a-new-register-allocator-for-zjit/

by tenderlove

5/30/2026 at 8:13:38 AM

Glad to read news on Ruby ZJIT development. I wonder if ZJIT is being used in production at Shopify yet?

by ksec

5/30/2026 at 9:35:57 AM

I have no idea; but I presume they don't, given that ZJIT today is still much slower than YJIT? [1]

[1]: https://rubybench.github.io

by molf

5/30/2026 at 4:39:41 PM

Used in production? Probably not yet. But likely tested in production on a small %. They’ve gotten practiced at using the Shopify Rails monolith as the biggest test suite and regression tests for Rails and Ruby.

by kimos

5/30/2026 at 7:01:31 PM

Yes that is what I meant, should have worded it as tested in production.

Hopefully it is no longer experimental in Ruby 4.1.

by ksec

5/30/2026 at 11:31:46 AM

How big is the lifetime holes thing in practice? On loops the contiguous-interval model spills way more than it should. Wondering if that alone explains most of the YJIT gap.

by nryoo

5/30/2026 at 8:25:32 AM

I’ve always wondered about linear scan vs SSA based spilling & regalloc, like libfirm & qbe use:

‘Register spilling and live-range splitting for SSA-form programs’ and ‘Preference-Guided Register Assignment’

It’s much cleaner to code, since you don’t need to generate live ranges explicitly, and can break it up in two passes. Linear scan creates new inactive /active intervals, while the ssa form allocators just reuse the ssa graph. I’ve never benchmarked them back to back though.

by djwatson24