relab / bbhash

Implementation of the BBHash minimal perfect hash function
MIT License
1 stars 1 forks source link

Consider to increase gamma for higher levels #13

Open meling opened 1 year ago

meling commented 1 year ago

We could increase gamma

For example, when there are only a few keys left to place, it might be worth growing the bit vector by a larger gamma factor to try to fit the remaining keys on the next level rather than storing 8 keys in the lowest 3-4 levels (each requiring 64 bits). The rationale is to reduce the number of levels by trying to place more keys on the "current" level (since the bit vector can hopefully avoid collisions that will require another level).

This would need to be benchmarked, both in terms of bits per key, number of levels, and creation and lookup performance.

We could possibly use the b.ReportMetrics to report bits per key and the number of levels.