Railsatscale iconRailsatscaleSep 2, 2026 ~1 min source read

ZJIT рџ¤ќ GC: Inlining GC Fastpath in ZJIT

It's been 8 years since the first just-in-time compiler was introduced in Ruby. However, throughout this time, the garbage collector has been a black box to the JIT compilers.

ZJIT рџ¤ќ GC: Inlining GC Fastpath in ZJIT

Share this story

Send the public story page.

Useful takeaways from this story.

It's been 8 years since the first just-in-time compiler was introduced in Ruby.

However, throughout this time, the garbage collector has been a black box to the JIT compilers.

This has all changed now that we have integration of the GC fastpath into ZJIT.

Building the complete brief

The page is ready to read now. The fuller skim-friendly version will appear here automatically.

The useful part

It's been 8 years since the first just-in-time compiler was introduced in Ruby. However, throughout this time, the garbage collector has been a black box to the JIT compilers. This has all changed now that we have integration of the GC fastpath into ZJIT.

How it works

  • we'll be looking at how object allocations work in the GC, what it means to inline the GC fastpath into ZJIT, and the performance implications.
  • Object Allocation In Ruby's default GC, object allocations previously used a free list based allocator.

Details worth keeping

The free list allocator keeps a linked list of all…

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app