Hello smart people of the Internet,
I'm using efficient/libcuckoo library for a c++ project I'm working on. I have a set of uint64_t that I want to store in libcuckoo's cuckoo_hash_map, but so far I noticed that it doesn't let me store them without values (the keys are the only thing I'm interested in hashing).
Is there a better solution in terms of memory efficiency (without replacing the cuckoo hash library or using a Bloom Filter)? Note: I only make use in the keys - I don't need the values.
Thanks in advance!
Solution I: I create pair<uint64_t, uint64_t> and store the key twice (once as the key and once as the value). Issue: I spend twice as space and I want to hash table as smaller as possible.
Solution II: I create pair<uint64_t, Empty> where the first element is my key and the second element is an empty class (Empty e; => sizeof(e) = 1). Issue: I get better results in terms of the size of the hash table, but I still have 1 byte of unused memory for every key I'm storing.