News for hackers. Stuff that matters.
Re:How to implement a hash table in C by tyingq on Friday March 26, 2021 @11:30AM (#26593280)
It's also how many popular, in production, hashtable implementations work.

From the uthash user guide, for example:

"Normal expansion - This hash attempts to keep fewer than 10 items in each bucket. When an item is added that would cause a bucket to exceed this number, the number of buckets in the hash is doubled and the items are redistributed into the new buckets. In an ideal world, each bucket will then contain half as many items as it did before."

So, the person questioning "why" should be instead explaining "why not".

There are no comments on this comment yet.