News for hackers. Stuff that matters.
Re:Migrating to Python 3 with pleasure by fyi1183 on Sunday February 04, 2018 @07:27PM (#16305759)
Non-determinism comes from randomness in the hash function. I don't know the details of the Python implementation, but generally you want randomness at the very least when processing potentially hostile user input. Otherwise your code is susceptible to a denial of service attack where the attacker sends data that was crafted to maximize hash collisions, to break the expected performance of hash tables.

From a theoretical angle, the only way to build hash tables with some kind of provable runtime guarantees is to include randomness.

There are no comments on this comment yet.