I think you have confused "ideal hash function" and "perfect hash function". A perfect hash function is one that maps a finite set of keys into the same number of buckets with no collisions. They have to be tailor constructed for the keys they are intended for and are not for general purpose use.<p>An ideal hash function on the other hand produces output that is indistinguishable from choosing the hash value for every key independently and randomly. In particular an ideal hash function should be a PRF, and it should handle any input size, and any keyset.<p>They aren't the same thing <i>at all</i>, and you should not confuse them. You cannot substitute an ideal hash function for a perfect hash function, or vice versa.
Just read the first two intro paragraphs, and already stumbled on 2 major mistakes:<p>"Hash functions are by definition and implementation pseudo random number generators (PRNG)."<p>No.<p>> "In practice it is generally recognized that a perfect hash function is the hash function that produces the least amount of collisions for a particular set of data."<p>No. A perfect hash function produces no collisions. "Least collisions" => better but not perfect.<p>I briefly looked over the rest, and this looks much better.<p>Just the last section is a bit misleading. First he talks about hashing in general and then he introduces his implementations of hash functions as "Available Hash Functions". This is not a generalization as above, it's merely his collection.<p>DJB: "It is one of the most efficient hash functions ever published." Nonsense. FNV is considered the generally most efficient simple hash function. DJB ranks in the middle of generic unaligned string hash functions.
It might be worth mentioning popular functions like FNV (<a href="http://isthe.com/chongo/tech/comp/fnv/" rel="nofollow">http://isthe.com/chongo/tech/comp/fnv/</a>) MurmurHash (<a href="https://github.com/aappleby/smhasher" rel="nofollow">https://github.com/aappleby/smhasher</a>) and SipHash (<a href="https://131002.net/siphash/" rel="nofollow">https://131002.net/siphash/</a>).
The post uses the term "internal state" pretty early on(initialize internal state, etc) and continues to reference it frequently for the algorithmic steps but nowhere is "internal state" defined. Can someone explain to me what this "internal state"?
A great resource for hash function performance: <a href="https://www.strchr.com/hash_functions" rel="nofollow">https://www.strchr.com/hash_functions</a><p>It includes a bunch of more modern hash functions the author missed.