Ruby Core Updates: ZJIT Performance and Memory Safety Improvements

Ruby's ZJIT compiler received significant performance optimizations through guard type recompilation support and C function call fixes, while the runtime improved memory safety with weak reference adoption for object tracing and scheduler CPU detection enhancements.

Duration: PT2M2S

Episode overview

This episode is a short developer briefing from Ruby Core Updates.

It explains recent repository work in plain language.

  • Show: Ruby Core Updates
  • Published: 2026-06-06T13:08:05Z
  • Audio duration: PT2M2S

Transcript excerpt

This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.

Good morning. This is Ruby Core Updates for June 6th, 2026.

Yesterday's activity centers on two major themes: substantial ZJIT compiler improvements and enhanced memory safety across Ruby's runtime systems.

The biggest performance story is ZJIT's new guard type recompilation support in PR 17133. This change dramatically reduces side exits from guard type failures, which were responsible for nearly 89 percent of exits in lobsters benchmarks. The implementation follows a proven strategy from earlier work and represents a…

On the memory safety front, PR 17202 converts object tracing to use weak references instead of free object trace points. This eliminates dangerous dangling references that could survive garbage collection cycles and cause crashes during compaction. The change ensures proper cleanup regardless of when objects are…

The threading system also saw improvement in PR 17100, which replaces the hardcoded eight-CPU limit in the M:N scheduler with dynamic detection using system calls. This allows Ruby to properly utilize modern multi-core systems without manual configuration.

Additional changes include JSON parser refactoring for better performance and a hidden array fix to…

Nearby episodes from Ruby Core Updates

  1. Security Hardening and Performance Optimization
  2. Weekly Recap - JIT Performance and Memory Management
  3. RubyGems Security and Documentation Polish
  4. Documentation Push and Runtime Improvements
  5. Memory Safety and Performance Focus
  6. ZJIT Optimizations and Memory Management
  7. ZJIT Optimization Push and Documentation Improvements
  8. Performance Optimizations and Infrastructure Improvements