Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Would you really prefer to be asked to write a cache-friendly hash map on a whiteboard?


It'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: