News for hackers. Stuff that matters.
Re:Why databases use ordered indexes but programming uses ha... by n3k5 on Wednesday December 11, 2019 @09:03AM (#21762369)
For the purpose of making a tree data structure, all linear orderings would be equally useful. Hashing only provides a partial order, so it's important to choose a hash function that won't assign the same hash to large batches of items.

But it only needs to have this property for hashes of one particular size, whereas a hash map requires a function that behaves well for a variety of hash sizes. So there's an opportunity for using a cheaper hash function.

There are no comments on this comment yet.