diff options
author | Eric Anholt <eric@anholt.net> | 2011-08-18 10:02:14 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2011-08-18 10:02:14 -0700 |
commit | 02d2ecbce44fb46bd001164b2509cec35b2f65f1 (patch) | |
tree | 16db82e8bc8ad28defd83c3a9958c7bf4ddefe27 /README | |
parent | 99ad0f60d58f88dc3e12fdce59c76897f220c59b (diff) |
Add a set implementation derived from the hash_table implementation.
While it was easy to produce, it's easier to do it once and maintain it than
leave this up to every possible user. Plus, it means it gets testing.
Diffstat (limited to 'README')
-rw-r--r-- | README | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -2,6 +2,9 @@ This is a simple hash table implementation written in plain old C. The goal is for this code to be reusable in many of the projects I've worked on that could use something better than a poorly-tuned chaining implementation. +A variant is included which is just a set -- hash and key, not hash, key, and +data. + The intention is that users of this code copy it directly into their repositories, as it's quite small and should see very little development. @@ -42,12 +45,6 @@ Performance considerations: This is worked around in practice by later inserts into a hash table with many deletes in it triggering a rehash at the current size. - * The data pointer increases space consumption for the hash table by around - 50% - - For some applications, such as tracking a set, the data pointer can - be removed from the interface and code relatively easily. - In addition to the core hash_table implementation, a sample of the FNV-1a 32-bit hash function is included for convenience for those that don't wish to analyze hash functions on their own. |