On Thursday August 9, chuck.lever@oracle.com wrote:
quoted
quoted
How have you tested the effectiveness of the new hash function?
I have not tested that point but I can easily imagine there are better
solutions.
Perhaps we can keep the same function for an IPv4 address (only taking
the 32 bits of IPv4 addr), and then design one for IPv6 addresses.
I see that, to generate the hash, you would be xor-ing the FF and 00
bytes in the canonicalized IPv4 address. Yes, perhaps a better function
is needed, or as you say, one specifically for IPv6 and one for
canonicalized IPv4.
I suspect that the given hash function will be as good as any other.
The values in each byte of an IPv6 are likely to be either evenly
distributed, or constant.
Each the first case you don't need a clever hash function to
distribute them, while in the second, no hash function can improve the
distribution.
NeilBrown