Writing Object Shape friendly code in Ruby
06-Oct-2023 602
Ruby 3.2 includes a performance optimization called Object Shapes, that changes how the Ruby VM stores, looks up, and caches instances variables (the variables that look like @ivar) . YJIT also takes advantage of Object Shapes, and the upcoming Ruby 3.3 has further improvements that improve the performance of Object Shapes.This is a brief blog post about how to write your own Ruby application code that is optimized for Object Shapes. If instead you’d like to learn more about how Object Shapes is implemented in Ruby, watch Aaron Patterson’s RubyConf 2022 video or read this explanation from Ayush Poddar .
Writing Object Shape friendly code in Ruby #ruby #rubydeveloper #rubyonrails #Writing #Object #Shape #friendly #code https://rubyonrails.ba/link/writing-object-shape-friendly-code-in-ruby