This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients christian.heimes, lemburg, methane, rhettinger
Date 2017-02-01.09:45:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On 01.02.2017 10:14, Christian Heimes wrote:
> PEP 456 defines an API to add more hashing algorithms and make the selection of hash algorithm a compile time option. We can easily add SipHash-1-3 and make it the default algorithm. Vendors then can select between FNV2, SipHash-1-3 and SipHash-2-4.

+1 on adding the 1-3 and making it the default; the faster
the better. Hash speed for strings needs to be excellent in Python
due to the many dict lookups we use in the interpreter.

Reading up a bit on the Rust thread and looking at this benchmark
which is mentioned in the thread:

it seems as if it would make sense to not use a fixed
hash algorithm for all strings lengths, but instead a
hybrid one to increase performance for short strings
(which are used a lot in Python).

Is there a good hash algorithm with provides better
performance for short strings than siphash ?

> On another note should we add SipHash-2-4 and 1-3 PRF to the hashlib mode?

+1 as well.
Date User Action Args
2017-02-01 09:45:24lemburgsetrecipients: + lemburg, rhettinger, christian.heimes, methane
2017-02-01 09:45:24lemburglinkissue29410 messages
2017-02-01 09:45:24lemburgcreate