hashtable - looking for hash table C library -
i did check previous questions on topic couldn't find solution meets need.
what need:
supports both strings, , integer tuples (int arrays in c). if it's integer array, length fixed @ compile time.
fast.
memory efficient. need use process super large data sets.
the capacity of hash tables grow dynamically. growth of size of hash tables handled library, instead of me.
i need create large number of such hash tables. , these hash tables linked tree, in values in 1 hash table point other hash tables.
my application both memory , cpu bound. -- how lucky am! :)
i don't consider c++ implementations now, unless couldn't find solution in c.
thanks!
what uthash - a hash table c structures.
- supports both strings, , integer tuples
uthash has no restriction vs. keys: key , structure can have any data type.
it includes default macros hash common key types, namely integer , strings. in addition provides generic macros (hash_add
, hash_find
) support any data type.
- fast
it sounds to be:
add, find , delete constant-time operations. [...] hash aims minimalistic , efficient. it’s around 900 lines of c.
- memory efficient
more details here:
the hash handle consumes 32 bytes per item on 32-bit system, or 56 bytes per item on 64-bit system. other overhead costs-- buckets , table-- negligible in comparison.
- the capacity of hash tables grow dynamically
it supported out-of-the-box:
bucket expansion occurs automatically , invisibly needed. there no need application know when occurs.
Comments
Post a Comment