// intended to be a minimal perfect hash function with fast and low memory construction, at the cost of higher bits/elem than other state of the art libraries once built.
// should work with arbitray large number of elements, based on a cascade of bloom filters
// intended to be a minimal perfect hash function with fast and low memory construction, at the cost of (slightly) higher bits/elem than other state of the art libraries once built.
// should work with arbitray large number of elements, based on a cascade of "collision-free" bit arrays
@@ -777,72 +754,25 @@ we need this 2-functors scheme because HashFunctors won't work with unordered_ma
uint64_ttotalBitSize()
{
uint64_tbloomsizes=0;
for(intii=0;ii<_nb_levels-1;ii++)
uint64_ttotalsizeBitset=0;
for(intii=0;ii<_nb_levels;ii++)
{
bloomsizes+=_levels[ii]->bloom->bitSize();
totalsizeBitset+=_levels[ii]->bitset->bitSize();
}
uint64_ttotalsize=_bitset->bitSize()+bloomsizes+_final_hash.size()*42*8;// unordered map takes approx 42B per elem [personal test] (42B with uint64_t key, would be larger for other type of elem)
uint64_ttotalsize=totalsizeBitset+_final_hash.size()*42*8;// unordered map takes approx 42B per elem [personal test] (42B with uint64_t key, would be larger for other type of elem)