3 ms·
note that the c++ built-in hash table is known to be really bad.
by adgjlsfhk1 4y ago
note that the c++ built-in hash table is known to be really bad.
- badsectoracula 4y agoYeah i guessed (i haven't really used them much myself), but the argument was about using the functionality in the standard library. Of course another practical alternative to both C++ and C (since the linked article is about C) is to use some 3rd party library.
- adgjlsfhk1 4y agoThe poor quality and inability to fix the the C and C++ std libraries are a large part of why (IMO) C and C++ aren't the future.
- chrsig 4y agos/be really bad/have an interface that precludes many optimizations. By saying things like "really bad", it discourages use at all, and for most uses std::unordered_map is fine.
- tialaramex 4y agoIt would be worth somebody gathering real world numbers from systems, to find out where people use std::unordered_map, how much are they leaving on the table, versus where people use say Folly F14, how small is the gain they're getting with their real workload. I would guess there are a lot of maps out there which in practice have a dozen things in them and so it doesn't matter how it works, a naive linear search would be fine too. But I genuinely have no idea, maybe it's 99% maybe it's 1%.