Ma Lin <malin...@163.com> added the comment:

If put a bytes object into multiple dicts/sets, the hash need to be computed 
multiple times. This seems a common usage.

bytes is a very basic type, users may use it in various ways. And unskilled 
users may checking the same bytes object against dicts/sets many times.

FYI, 1 GiB data:

function         seconds
hash()           0.40
binascii.crc32() 1.66   (Gregory P. Smith is trying to improve this)
zlib.crc32()     0.65

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46864>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to