Serhiy Storchaka added the comment:
I tested different kind of strings.
$ ./python -m timeit -n 1 -s "t = b'a' * 10**8" "hash(t)"
$ ./python -m timeit -n 1 -s "t = 'a' * 10**8" "hash(t)"
$ ./python -m timeit -n 1 -s "t = '\u0100' * 10**8" "hash(t)"
$ ./python -m timeit -n 1 -s "t = '\U00010000' * 10**8" "hash(t)"
current SipHash
bytes 181 msec 453 msec 2.5x
UCS1 429 msec 453 msec 1.06x
UCS2 179 msec 897 msec 5x
UCS4 183 msec 1.79 sec 9.8x
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14621>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com