Re: ISO recommendations for hash table lib




"cr88192" <cr88192@xxxxxxxxxxx> wrote in message
news:h0u9so$cod$2@xxxxxxxxxxxxxxxxxxxx

"kj" <no.email@xxxxxxxxxxx> wrote in message
news:h0tve2$drs$1@xxxxxxxxxxxxxxxxxxxx



Can someone recommend a decent hash table library? I know about
the functions in search.h (hsearch, etc.), but I need to be able
to have multiple hash tables simultaneously, so this is out.

TIA!

kynn

P.S. Yes, I know I can ask "The Google" for links to "hash tables
in C", but rather than links, what I'm looking for are recommendations
from satisfied (and knowledgeable) customers.


can you not just write it yourself?...

for something THIS simple, if anything, you would need the learning
experience...

and then, maybe 50-150 lines of code later (if that), one will have gained
at least a small sliver of knowledge...

or until one is perplexed by such a task as, say, implementing a linked
list, or calculating the sum of an array of numbers...


(Aside: Use of complete sentences on USENET is a virtue).

Designing and implementing a hashing library is more difficult (say 5X to
10X) than a linked list. There are many more choices to consider for
implementation and more research and thought is therefor required (indeed,
one may need linked list techniques to implement hashtables if chaining is
chosen as the solution to collisions). The first hashtable one creates will
surely not be the last nor will there be only one hashtable design to
satisfy all needs. It will take a few (or a dozen) iterations and use over
time to settle and be satisfied with some "final" designs. The OP may want
to take a look at a C++ library for useful algorithms and design ideas if
that language is not a deterent to him, as those are evolved and robust
implementations. A container and algorithm library should have cohesiveness
and developing one container in isolation is a "myopic" approach. Finally, a
hashtable should not be the first container a noob should try to create.


.



Relevant Pages

  • Re: ISO recommendations for hash table lib
    ... to have multiple hash tables simultaneously, ... design ideas if that language is not a deterent to him, ... near one of the simplest things to implement (well, ok, linked lists ... ways to implement hashtables and many of those are "domain"-specific. ...
    (comp.lang.c)
  • Re: [PROPOSAL/PATCH] Fortuna PRNG in /dev/random
    ... was good not to rely *entirely* on the ahsh algorithms. ... The point is that the current random.c design DOES NOT ... RELY on the security of the hash function. ... plaintext that's not one of the two. ...
    (Linux-Kernel)
  • Re: My First C# (warning - long post)
    ... defined as a COBOL structure of 8192 bytes (this is for ... Hashtables use two objects, one is a 'key' and the other a 'value'. ... but is for storing keys only. ... // Add some elements to the hash table. ...
    (comp.lang.cobol)
  • Re: Help creating my own classes...
    ... Hash: SHA1 ... HTML is not a good idea. ... The designer can work on the design part without the fear breaking the ...
    (alt.php)
  • Re: Tenacity should be rewarded
    ... constructed tree, its a hash table and with hash tables, you either ... create a "perfect hash" design or you design the collision handling ... be individually located with the collision handling code. ... Arrrrgh, CUM the REVOLUTION KOMRADE, your assembler coding can be as ...
    (alt.lang.asm)