4 ms·
If the ordering is determined by a hash function and it's always the same it is likely a defect in the implementation, because keys can be easily chosen to caus
by blattimwind 7y ago
If the ordering is determined by a hash function and it's always the same it is likely a defect in the implementation, because keys can be easily chosen to cause massive performance degredation; essentially a DoS attack. That's why many dynamic languages these days use things like siphash with a random key.
- pfdietz 7y agoI'll argue that having the order depend on the hash function, rather than insertion order, is the problem. It's bad to have unnecessary nondeterminism in software. It makes testing and reproducing bugs unnecessarily difficult.