tags:

views:

164

answers:

4

Hello, I was wondering if you knew of a robust implementation of a hashtable in C. I'm looking for something other than ghashtable in glib. Thanks.

+1  A: 

Will this hashtable work? (got the link from the second post of this thread)

Perhaps this one will?

(got the above from a Google search for "hashtable in c", am not a C programmer)

RCIX
+1  A: 

I've heard good things about the GLib Hash Table.

R Samuel Klatchko
+1  A: 

For a hash table I'd use google-sparsehash

PD: I don't know your requirements, but take a look at HDF5, bear in mind it exists just in case.

update

Memory Structures Library (MemSL2), o MemSL2 in another link it has implementations (one in pure C and wrappers for C++) of structures, for example, AVL trees, threaded trees, ..., and

  • Hash Tables with Separate Chaining,
  • Hash Tables with User-Defined Paging
  • Hash Tables with Dynamic Paging
that was nice (google-sparsehash), but I'm after a pure C implementation.
Dervin Thunk
A: 

You might want to look into using the Apache Portable Runtime? It's license is very liberal and it provides a decent hashtable implementation:

apr_hash.html">http://apr.apache.org/docs/apr/1.3/group_apr_hash.html

flitzwald