4 ms·
Would you really prefer to be asked to write a cache-friendly hash map on a whiteboard?
by sklogic 11y ago
Would you really prefer to be asked to write a cache-friendly hash map on a whiteboard?
- fiatmoney 11y agoIt's not really that hard. Open addressing + linear probing + magic value for deletions is something you can implement in 15 minutes if you know how hashmaps work. Of course "cache friendly" is relative; any hashmap has pseudorandom memory accesses as a core part of its design so again, array scans will beat it below a certain number of elements.