Results 26 comments of Attractive Chaos

PS: when you keep the pointers to strings elsewhere, example 2 in the [documentation page](http://attractivechaos.github.io/klib/#Khash%3A%20generic%20hash%20table) is preferred as it does not duplicate the string contents.

@makmanalp Sorry. `kh_exist` tests if a bucket in the hash table has ever been filled before. If an element is deleted with `kh_del`, it still takes up the bucket, so...

@mathog Thanks for the suggestions. 1. In the current code, `khiter_t` is only used in the example, not elsewhere. Both `kh_put` and `kh_get` returns `khint_t`. 2. When I was debugging...

@joeatbayes Thanks for the explanation. I will show a tiny example to see it helps (not tested). ``` c #include "khash.h" typedef struct { int x, y; } myval_t; KHASH_MAP_INIT_STR(str,...

No, the table never shrinks automatically. You have to manually shrink the table by calling kh_resize(). khash may automatically rehash to the same size in order to clear "tomestones" when...

Khash doesn't automatically shrink because it can't expect what users will do with the hash table. Automatic shrink may have big unexpected performance hits. It's better to let users decide.