STINNER Victor added the comment: > (dicts and sets have a sophisticated probing algorithm which takes into > account the whole hash value, not the masked one).
Correct, so your specific example should not be a problem since the whole hash value is different for the 6 hash values. > Now to know if that may produce slowdowns in some situations... pybench and perf.py can be used to measure performances of the patch. The speedup may not be detected, but a slowdown would be detected at least. 2013/4/9 Antoine Pitrou <rep...@bugs.python.org>: > > Antoine Pitrou added the comment: > > Well, the quality of the hash function is clearly reduced: > >>>> hash("abcdefgh") & 0xff > 206 >>>> hash("abcdefgi") & 0xff > 206 >>>> hash("abcdefgj") & 0xff > 206 >>>> hash("abxxxxxx") & 0xff > 206 >>>> hash("aaaaaa11") & 0xff > 206 >>>> hash("aaaaaa12") & 0xff > 206 > > > Now to know if that may produce slowdowns in some situations... (dicts and > sets have a sophisticated probing algorithm which takes into account the > whole hash value, not the masked one). > > ---------- > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue16427> > _______________________________________ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16427> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com