YJIT delivered a significant speedup to various real-world applications. Have you wondered how a Just-In-Time compiler makes your application fast?
Ruby 3.2 has a secret backdoor to hook your own Just-In-Time compiler. Using that “feature”, this talk will guide you through how a Ruby JIT can be written in Ruby. You’ll learn the basics of Ruby VM, how to encode native instructions in Ruby, and interesting optimizations that JIT can do with them.