[issue34751] Hash collisions for tuples
Tim Peters
report at bugs.python.org
Tue Oct 2 17:12:25 EDT 2018
Tim Peters <tim at python.org> added the comment:
>> I've noted before, e.g., that sticking to a prime
>> eliminates a world of regular bit patterns in the
>> multiplier.
> Why do you think this? 0x1fffffffffffffff is prime :-)
Point taken ;-) But "a world of" is not the same as "the universe". For example, sticking to a prime you'll never get 8 bytes the same. Etc - "a world of" extremely regular patterns are eliminated.
> Having regular bit patterns and being prime are independent
> properties.
>
> To be clear: I don't have anything against picking a prime
> but we just shouldn't pretend that primes are important
> when they are not. That's all...
I don't like arguments from ignorance. As I've said, I don't know why SeaHash uses a prime. Neither do you. Our collective ignorance doesn't imply the designer didn't have a good reason.
I can't think of a "good reason" for it either, but that's where we differ: I think "so don't make gratuitous changes" while you think "therefore it can't possibly matter" ;-)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34751>
_______________________________________
More information about the Python-bugs-list
mailing list