Hacker News new | ask | show | jobs
by rurban 1107 days ago
search for htable or hashtable in thousands of open source projects. only a minority has worse hashtables than this one (clisp, perl5 e.g.).

For better ones I would point to my linked list implementation: https://github.com/rurban/ctl/blob/master/ctl/unordered_set.... (because it has various security policies, nobody else has) or https://github.com/LIMachi/swiss-table (all in C)

1 comments

Having Swiss Tables (a more or less state of the art hash table for modern computers) is attractive but I think it'd be appropriate to be scared of unmaintained C labelled as a "proof of concept".

The CTL "unordered set" is roughly the same bad design as its namesake in C++, presumably on purpose. We really shouldn't be teaching new users this bad structure, nor the "security policy" mitigations it provides. And by the way it's not a "distributed" denial of service when somebody plugs 128 colliding values into your API, just a normal trivial DOS.