Тsфdiиg @tsoding.bsky.social · Apr 6

I made a Hash Table in pure C that you can just use like this:

133 likes 5 replies

?

Replies

novr · Apr 9

I really dig this implementation. Has me thinking about ways that you could hide the explicit append call with `ht` as a function pointer that could be interacted with as if it were a python dict. looping could be as if you indexed an array by passing a sentinel value to ht to get the address

David Buchanan · Apr 6

I'm curious, what motivated having a combined "hasheq" method rather than separate hash and eq?

PureAsbestos · Apr 6

the use of = here is fascinating

Тsфdiиg · Apr 6

Check it out! github.com/tsoding/ht.h

irek · Apr 7

I enjoyed your recent stream about different hashing functions. I see that you kept fnv1a as default. I used to use djb2 but according to your tests - fnv1a is better. OFC results might change base on dataset. Regardless I'm planning on trying fnv1a in my next project. Thanks