Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
YJIT, an open source project led by a small team of developers at Shopify to incrementally build a new JIT compiler inside CRuby. Key advantages are that our compiler delivers very fast warm up, and we have complete, fine-grained control over the entire code generation pipeline. In this talk, I present the approach we are taking to implement YJIT and discuss early performance results. The talk will conclude with a discussion of what steps can be taken to unlock higher levels of performance for all JIT compilers built inside CRuby, be it YJIT, MJIT or any future JIT compiler efforts. RubyKaigi Takeout 2021: https://rubykaigi.org/2021-takeout/presentations/maximecb.html
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
The video titled "YJIT - Building a new JIT Compiler inside CRuby" features Maxime Chevalier-Boisvert, who discusses the design and development of YJIT, a new just-in-time (JIT) compiler being built for the CRuby programming language by a team at Shopify. The talk outlines the reasons for creating YJIT, its incremental approach, and its compatibility with existing Ruby code. ### Key Points Discussed: - **Reasons for Building YJIT:** - YJIT aims to improve performance for large-scale, real-world applications, particularly those involving Ruby on Rails, by leveraging a JIT compilation strategy. - Myriad JIT compilers exist for Ruby, but many are outdated or lack maintenance. YJIT aims to address performance issues associated with dynamically-typed languages. - **Technical Details:** - YJIT operates using lazy basic block versioning, allowing for specialization of machine code types during execution while maintaining Ruby's dynamic nature. - Unlike traditional JIT compilers, which compile entire methods, YJIT compiles smaller code blocks, facilitating optimizations based on runtime observations. - **Performance Comparison:** - In preliminary tests against CRuby, MJIT, and Truffle Ruby, YJIT demonstrates significant speed improvements, especially in terms of warm-up performance compared to other compilers. - YJIT has been successful in achieving compatibility with existing Ruby tests and frameworks, showcasing its potential for production use. - **Challenges and Improvements:** - Despite the promising results, YJIT encounters bottlenecks inherent to CRuby, including inefficiencies related to method calls and instance variable handling. - Future goals include optimizing certain structures, integrating with ARM 64 architecture, and collaborating with Ruby core developers to enhance JIT compiler performance across all Ruby implementations. The video concludes with an emphasis on the potential for YJIT to deliver measurable performance enhancements over time while ensuring the integrity and compatibility of Ruby applications.
Suggest modifications
Cancel