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 <d42c3abf-19ac-7f1d-90c4-1d624aac87d5@egenix.com>
In-reply-to <1485940498.52.0.731443649589.issue29410@psf.upfronthosting.co.za>
Content
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:

https://imgur.com/5dKecOW

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.
History
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