A small library that implements hash table with synchronization mechanism. Uses Open Addressing techniques
(Linear Probing), tombstones and pthread_rwlock_t
locking utilities. Code is in lib
folder.
API are the following:
hash_insert(HashTable* ht, char* key, void* element)
hash_get(HashTable* ht, char* key)
hash_remove(HashTable* ht, char* key)
There are 2 scripts to test this library available (inside test). Both do count words of words.txt:
demo.c
for single thread testing purposesdemo-thread.c
for multi-thread purposesdemo.py
for Python'sdict
comparison
A report on the project and its performance is available (in italian)