Subject: Re: more Q&D results [hash for use in the kernel]
To: Jason R Thorpe <>
From: ozan s. yigit <>
List: tech-kern
Date: 11/28/2001 14:42:16
| So, given that the perl hash function seem at least as good as fnv,
| and is compiled into much shorter code, I would say that it's an
| obvious candidate for a string_hash() and binary_hash() in the kernel.

i tend to agree. i will try to run these tests over binary strings like
kernel pointers et al. as soon as i can.

| While the byacc hash is very fast, it comes with a caveat; it needs to
| know the hash table size in the inner loop, so if you have a table that
| is dynamically-sized, it's not a good candidate (it uses the table size
| as a modulo in the inner loop .. although, assuming a power-of-two table,
| this can be reduced to a bitmask ... and is in our byacc sources).

exactly so. i excluded the test from the prime-sized test for that reason.