4 ms·
Not really true, putting things in a hash map is pretty fast, and generally faster than a comparison based sort.
by Ono-Sendai 6y ago
Not really true, putting things in a hash map is pretty fast, and generally faster than a comparison based sort.
- cozzyd 6y agoA hash map is unsorted so it's not a useful way to sort data
- Ericson2314 6y agoVery true. I like rich keys with non-trivial comparison cost. I even better like nested maps which no only are often useful in their own right, but also server to cache the cost of comparison wrt the original map---a domain-specific trie. Map are just far more the bread and butter of programming than sorting, and not just if you are using the one of the languages satirized by https://elbenshira.com/blog/the-universal-data-structure/ https://elbenshira.com/blog/the-universal-data-structure/