[issue29410] Moving to SipHash-1-3

INADA Naoki report at bugs.python.org
Wed Feb 1 04:50:44 EST 2017


INADA Naoki added the comment:

> 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 ?

There is undocumented option "Py_HASH_CUTOFF" to use DJBX33A for short string.

See https://github.com/python/cpython/blob/master/Include/pyhash.h#L98

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29410>
_______________________________________


More information about the Python-bugs-list mailing list