Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
When optimizing code for the YJIT compiler it can be difficult to figure out what code is exiting and why. While working on tracing exits in a Ruby codebase, I found myself wishing we had a tool to reveal the exact line that was causing exits to occur. We set to work on building that functionality into Ruby and now we are able to see every side-exit and why. In this talk we’ll learn about side-exits and how we built a tracer for them. We’ll explore the original implementation, how we rewrote it in Rust, and lastly why it’s so important to always ask "can I make what I built even better?"
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 the talk titled "Exit(ing) Through the YJIT," presented by Eileen M. Uchitelle at RubyConf 2022, the focus is on optimizing Ruby code for the YJIT (Yet Another Just-In-Time) compiler. Eileen discusses the challenges faced while tracing exits in a Ruby codebase, emphasizing the need for tools that reveal the specific lines causing exits during code execution. Key points of the presentation include: - **Introduction to YJIT**: Eileen explains the difference between JIT (Just-In-Time) compilers and traditional compilers, highlighting the advantages of YJIT over MJIT (Method-based JIT), which tends to slow down Rails applications. - **Development of YJIT**: The talk covers the history and design of YJIT, originally written in C but later rewritten in Rust for improved performance and compatibility across different architectures. - **Understanding JIT Exits**: Eileen discusses what exiting the JIT means and how it impacts Ruby performance. YJIT aims to minimize exits by only compiling the parts of code that are executed. - **Exit Statistics and Tracing**: The presentation introduces a new tool, "YJIT Trace Exits," designed to track backtraces of exits, allowing developers to see exactly where in the code these issues occur. This aims to eliminate guesswork in optimization. - **Real Code Examples**: Eileen provides practical demonstrations of how to configure and run YJIT, collect data on exits, and how to enhance Ruby code to prevent these exits. For instance, she shows how an incorrectly passed argument type can cause exits, demonstrating how to refactor such code for better compatibility with YJIT. The talk concludes by reinforcing the importance of community contributions in the ongoing development and optimization of YJIT. Eileen encourages participants to adopt YJIT, report issues, and contribute upstream to make Ruby faster and more efficient in the long term.
Suggest modifications
Cancel