Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Since we introduced a JIT compiler to Ruby in 2.6, it had been known to slow down production applications like Rails. This year, we finally figured out why it was the case and found a way to fix it. Now we can even see the JIT compiler of Ruby 3.0 optimizes one of the most popular Rails applications. In this talk, you'll learn some tricks to make sure it happens on your production application. Get the easy speedup of your application for free!
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
In his talk at RubyConf 2021, Takashi Kokubun presents strategies for optimizing production performance in Ruby applications utilizing the MRI JIT (Just-In-Time) compiler. He discusses the challenges and advancements related to the JIT compiler since its introduction in Ruby 2.6, particularly focusing on the improvements made in Ruby 3.0. ### Key Points Discussed: - **Introduction to MRI JIT:** Kokubun begins by explaining the different versions of the JIT compiler, including MJIT, which leverages a C compiler, and the upcoming Widget project aimed at optimizing performance further. He highlights how MRI has evolved and the reasons behind slowing execution in previous Ruby versions. - **Tuning JIT Performance for Rails Applications:** He emphasizes that using Ruby 3 (particularly version 3.0) enables significantly better performance compared to earlier versions. Kokubun provides insights into optimizing Rails applications by tuning JIT settings and recognizing the limitations of earlier Ruby versions. - **Warming Up Performance:** Kokubun introduces techniques for warming up the JIT compiler to reach peak performance. This includes setting appropriate thresholds for method calls to ensure that methods are recognized and compiled efficiently. - **Performance Considerations and Optimizations:** He discusses specific optimization tips such as adjusting the `jit.max_cache` option to a higher value to compile more methods, the impact of using trace points in the Rails framework, and potential locking issues that occur during method compilation. - **Future of MRI JIT:** Finally, he speculates on the future of Ruby's JIT compilation, mentioning ongoing efforts to improve performance through the integration of new compiler architectures like Widget and MIR (Mid-level Intermediate Representation). ### Conclusion: Kokubun concludes that while using the JIT compiler may initially seem to slow down production applications, with the proper tuning and understanding of its functionalities, developers can achieve significant speed improvements. He advocates for the continuous development and shift towards Widget as a promising avenue for further enhancements in Ruby performance, enhancing productivity for developers working with Ruby on Rails.
Suggest modifications
Cancel