⬅︎ Back to Best non-cryptographic hashing function in Python (size and speed)
Python has a built-in hash() function that's faster than all of these.
The build-in hash function will not always return the same results across different invocations of your program. Check out the note at the bottom of the hash documentation about PYTHONHASHSEED: https://docs.python.org/3/reference/datamodel.html#object.__hash__
Yeah, I was testing in an pre 3.3. fnv is ok i guess.
Unfortunately, for many uses, the use of Python's hash function is terribly flawed. Ex.: `hash(-1) == hash(-2)` =(
Comment
Python has a built-in hash() function that's faster than all of these.
Replies
The build-in hash function will not always return the same results across different invocations of your program. Check out the note at the bottom of the hash documentation about PYTHONHASHSEED: https://docs.python.org/3/reference/datamodel.html#object.__hash__
Yeah, I was testing in an pre 3.3. fnv is ok i guess.
Unfortunately, for many uses, the use of Python's hash function is terribly flawed. Ex.: `hash(-1) == hash(-2)` =(