Random Ruby performance tip: if you are using anything more complicated than strings/symbols for hash keys, you may want to consider caching their hash values (override the Object#hash method to do so).

@mperham @presidentbeef those goes hand-in-hand, no? caching with mutable keys are hard..

that said, I rarely use complicated structures as keys

Sign in to participate in the conversation

A Mastodon instance for Rubyists & friends