Explore the optimization journey of Ruby's `is_a?` method in this 27-minute conference talk from RubyConf Mini 2022. Discover how this seemingly simple method can become a surprising performance bottleneck in Ruby applications. Learn about the various ways `is_a?` is used, including case statements, rescue statements, protected methods, and `Module#===`. Follow the speaker's process of identifying the bottleneck in production, implementing optimizations, and resolving bugs. Gain insights into the transformation of `is_a?` into constant-time operation and its implementation in assembly language for YJIT. Understand the performance improvements achieved in Ruby 3.2 and how these optimizations can benefit your Ruby projects.
Overview
Syllabus
RubyConf Mini 2022: Making .is_a? Fast by John Hawthorn
Taught by
Ruby Central