Next: , Up: Data structures



4.5.1 Hash table

There are two universal generators of hash table routines, one in lib/sht.h and one in lib/hashtable.h. These are not normal header files, these are generators of hash tables. After the inclusion, a unique set of hashing routines is generated, with properties depending on symbols defined before the inclusion. See the files' header for details how to use it.

The reason for implementing general hashing routines like this is that it is completely callback-free, thus speeding them considerably. Moreover, it gives the programmer a control of what routines are generated and what exactly they shall do.