How can I instruct python to store, internally, a pre-hashed version of my strings, so that it will use that value when I perform dict/set lookups using my string as a key?
I remember reading about it some weeks ago, but can’t find it in python docs at the moment :-/
String interning is probably what you’re thinking of.
See
sys.internin Python 3See
internin Python 2