8
djsumdog
103d

The C Standard Library has a Hash Table implementation, and it's a man-made horror beyond comprehension:

https://youtube.com/watch/...

Comments
  • 8
    I don't want to C this.
  • 1
    Didn't know. Skipped trough it. What's wrong with it? Looks decent to me
  • 3
    @retoor you like that kinky stuff 😄
  • 3
    @retoor fixed size stack allocated, you can only have exactly one at a time, inserting is achieved using the “search” function (and passing INSERT flag). It’s basically as bare bones and confusing as a simple data structure gets
  • 0
    @AlgoRythm yh, the inserting is weird indeed. The predefined size is a performance thingy I guess. Allocate once. Regarding one at a time, just create pointer to the value in result if you need more at once.

    Prefer to use my own. Benchmarked it against the c++ std::map and it wins

    Have seen no one using this implementation. Everyone writes themselves.
  • 1
    I tried Wayland out again for a few months, this time using Hyprland. It was a way better experience than Sway. I want to love it, but I still ran into some really frustrating issues:

    https://battlepenguin.com/tech/...
  • 1
    Oh man, reminds me of this critique of an offical blog post for the hare language (anyone remember hare?) about how to implement hashmaps

    https://ayende.com/blog/197185-B/...
  • 1
    @12bitfloat it’s the first time that I’m hearing about hare
Add Comment