Skip to main content

FNV

Fowler–Noll–Vo or FNV is the hashing system used by MySims to hash various names.

FNV32 vs FNV64​

MySims specifically used FNV32 for uint32's and FNV64 for uint64's. In practice this means shaders names and groups use FNV32 while instances use FNV64.

SizePrimeBasis
320x010001930x811c9dc5
640x00000100000001b30xcbf29ce484222325

Algorithm​

In pseudocode, taken from Wikipedia.

algorithm fnv-1 is
hash := FNV_offset_basis

for each byte_of_data to be hashed do
hash := hash × FNV_prime
hash := hash XOR byte_of_data

return hash