Tuning Ruby's Global Method Cache

I was recently profiling a production Shopify application server using perf and noticed a fair amount of time being spent in a particular function, st_lookup, which is used by Ruby’s MRI implementation for hash table lookups: Hash tables are used all over MRI, and not just for the Hash object…

Sources