logoalt Hacker News

ancientstraits • today at 12:35 AM • 3 replies • view on HN

The "how to implement a hash table" article https://benhoyt.com/writings/hash-table-in-c/ was really helpful for me. I thought that hash tables were something that were basically impossible to make in C, but this showed that it was simpler.


Replies

eru • today at 2:58 AM

You can also look at how CPython implements hash tables in C. The implementation is surprisingly approachable for a real world one.

➕ show 1 reply
dprkh • today at 12:48 AM

Arrays are hash tables. You can implement a very simple hash table from a tutorial, but can you implement a sophisticated one? What about a concurrent hash table?

➕ show 1 reply
applfanboysbgon • today at 3:11 AM

> I thought that hash tables were something that were basically impossible to make in C,

Why would you believe this in the first place?

➕ show 1 reply