On Sep 19, 2019, at 19:18, Richard Higginbotham <higgi...@gmail.com> wrote: > > It's not really constant though.
It’s really hard to have a discussion when all of your posts are all replies, but you don’t give us any clue what you’re replying to. There are multiple responses from multiple people since your last email, each with multiple paragraphs covering multiple subjects. So I have no idea what “it” refers to. Or what “though” is challenging. But I think what you’re trying to do is argue that hash tables don’t work. > hash values can collide and the bigger the data set the more likely it is to > happen No. The mean rate of collisions does not depend on the size of the data set, it depends on the load factor—the size of the data set divided by the size of the hash table. This means that, even if you don’t know the size of the needed hash table in advance (which we actually _do_ know here), just expanding geometrically (the same way lists expand) whenever you reach a triggering load factor is good enough to guarantee amortized constant time for all operations. The fact that it sounds implausible to you at first glance and you can’t understand one set of numbers does not overthrow decades of theoretical proofs and practical experience. Hash tables really do work. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/OHAK4SFWRAUBSNTCSAF7ZD6SVQBMTVB3/ Code of Conduct: http://python.org/psf/codeofconduct/