dryman/opic

pure in memory PascalHashTable

Opened this issue · 1 comments

Does it make sense to support non-disk backed hash tables?

    PascalHashTable* table = PHNew(NULL,
        2000000, // table size: 20 elements
        0.7, // table load: 70%
        10, // inline size for key
        sizeof(data)); // value size

I just did some tests with shm backed hash tables. https://la.wentropy.com/hI-L

The fixed key sized hash table consumes the same amount RSS as unordered_map while variant key sized hash table doubles the memory consumption. Both hash tables are 3 times slower than unordered_map when doing insertion.

Is that a fair benchmark? What benefits can I get for using opic hash tables in memory only?