3 ms·
Do you rewrite fundamental data structures over and over, like maps, of just not use them?
by john01dav 11mo ago
Do you rewrite fundamental data structures over and over, like maps, of just not use them?
- 1718627440 11mo agoC (actually POSIX) has a hashmap implementation: https://man7.org/linux/man-pages/man3/hsearch.3.html https://man7.org/linux/man-pages/man3/hsearch.3.html What it doesn't have is a hashmap type, but in C types are cheap and are created on an ad-hoc basis. As long as it corresponds to the correct interface, you can declare the type anyway you like.
- dmitrygr 11mo agoOften yes, specialized to the specific thing I am doing. Eg: for a JIT translator one often needs a combo hash-map + LRU, where each node is a member of both structures.