Tim Peters <t...@python.org> added the comment:

BTW, those tests were all done under a 64-bit build.  Some differences in a 
32-bit build:

1. The test_tuple hash test started with 6 collisions.  With the change, it 
went down to 4.  Also changing to the FNV-1a 32-bit multiplier boosted it to 8. 
 The test passes in all those cases.

2. For 4-tuples taken from range(-50, 51) omitting -1 and -2:  massive number 
of collisions under the current code.  Died with MemoryError with the change - 
ran out of memory to build the Counter recording all the distinct hash codes.

Changing it to 3-tuples instead:  somewhere around 140 collisions with the 
change, and also changing to the FNV-1a 32-bit multiplier eliminated all 
collisions.

All of this was done under Win 10, using Visual Studio 2017.

----------

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

Reply via email to