Adding `opt_respond_to` to the Ruby VM: part 1

@byroot has been posting a series on optimizations he and others have made to the json gem, and it&rsquo;s been 🔥🔥🔥. Enjoyable and informative, I highly recommend reading what he&rsquo;s posted so far. In his second post , he mentions the possibility of improving performance by adding an additional method cache. This would involve compiling respond_to? calls in a special way: It actually…