Message186405
> (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 <report@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 <report@bugs.python.org>
> <http://bugs.python.org/issue16427>
> _______________________________________ |
|
Date |
User |
Action |
Args |
2013-04-09 13:40:02 | vstinner | set | recipients:
+ vstinner, tim.peters, rhettinger, gregory.p.smith, jcea, mark.dickinson, pitrou, christian.heimes, asvetlov, skrah, python-dev, serhiy.storchaka |
2013-04-09 13:40:02 | vstinner | link | issue16427 messages |
2013-04-09 13:40:01 | vstinner | create | |
|