Oh my, again a blog post talking about MPH being O(1) but not talking about the constant factors which make this simple approach only useful for &gt;100.000 keys.<p>People, those two-way hashing schemes are already available in the cmph library, even compressed.
But even the fastest of the 6 cmph algorithms is much slower than any other perfect hash algorithm with a normal number of keys. (i.e. &lt;100.000) There is a high constant overhead and a high run-time overhead with the 2 hashes.<p>For comparisons see <a href="https:&#x2F;&#x2F;github.com&#x2F;rurban&#x2F;Perfect-Hash#benchmarks" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rurban&#x2F;Perfect-Hash#benchmarks</a>