Message286606
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. |
|
Date |
User |
Action |
Args |
2017-02-01 09:45:24 | lemburg | set | recipients:
+ lemburg, rhettinger, christian.heimes, methane |
2017-02-01 09:45:24 | lemburg | link | issue29410 messages |
2017-02-01 09:45:24 | lemburg | create | |
|