Pre-hashed string keys for quickly finding Python dictionaries?

How can I instruct python to store the internal version of a pre-hashed version of my strings so that it uses this value when I do a type / set search using my string as a key?

I remember reading about this a few weeks ago, but can't find it in python docs at the moment: - /

+8
optimization python string dictionary hash
source share
1 answer

http://docs.python.org/library/functions.html#intern is probably what you are thinking about.

+3
source share

All Articles