Message186405
| Author |
vstinner |
| Recipients |
asvetlov, christian.heimes, gregory.p.smith, jcea, mark.dickinson, pitrou, python-dev, rhettinger, serhiy.storchaka, skrah, tim.peters, vstinner |
| Date |
2013年04月09日.13:40:01 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAMpsgwaM8t1zVf5CHXENZ3PcLuyizuf_OOVUMETK2H3PW+xf0w@mail.gmail.com> |
| In-reply-to |
<1365514473.29.0.657560354102.issue16427@psf.upfronthosting.co.za> |
| Content |
> (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>
> _______________________________________ |
|
History
|
|---|
| 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 |
|