public static long fastLongMix ( long k ) { // phi = 2^64 / goldenRatio final long phi = 0x9E3779B97F4A7C15 L ; long h = k * phi ; h ^= h >>> 32 ; return h ^ ( h >>> 16 ) ; }
Hash function based on Knuth s multiplicative method . This version is faster than using Murmur hash but provides acceptable behavior .