Thomas Wang's 32 bit Mix Function I have since searched for a faster version of the integer hash function. This is my latest version. Having more rounds will strengthen the hash function by making the result more random looking, but performance will be slowed down accordingly. Simulation seems to prefer small shift amounts for inner rounds, and large shift amounts for outer rounds. Using Multiplication for Hashing As previously mentioned, using multiplication requires a mechanism to transport changes from high bit positions to low bit positions.
Bit reversal is best, but is slow to implement.
The alternatives are left shifts, and Substitution box lookup. This example hash function uses multiplication with odd constants, and left shifts. For more strength, one can simply add more rounds of multiplication, alternating between c1 and c2. We take the high bit position of the multiplication as input, and exclusive-or the value of the substitution box with the value of the multiplication result. Care need to be considered to make the operation reversible, by making sure the high bit is untouched.