AI summary not available
This video doesn't have a transcript yet
Transcript not available
This video doesn't have captions
Start a conversation
Ask anything about RubyConf 2022: Splitting: the Crucial Optimization for Ruby Blocks by Benoit Daloze
AI responses may be inaccurate. Verify important information.
RubyConf 2022: Splitting: the Crucial Optimization for Ruby Blocks by Benoit Daloze
Blocks are one of the most expressive parts of the Ruby syntax. Many Ruby methods take a block. When a method is given different blocks, there is a crucial optimization necessary to unlock the best performance. This optimization dates back to the early days of research on dynamic languages, yet it seems only a single Ruby implementation currently uses it. This optimization is called splitting and what it does is using different copies of a method and specialize them to the block given at different call sites. This enables compiling the method and the block together for the best performance.