private static long FNVhash64(long val){
  long hashval=FNV_offset_basis_64;
  for (int i=0; i < 8; i++) {
    long octet=val & 0x00ff;
    val=val >> 8;
    hashval=hashval ^ octet;
    hashval=hashval * FNV_prime_64;
  }
  return Math.abs(hashval);
}

private static long FNVhash64 ( long val ) { long hashval = FNV_offset_basis_64 ; for ( int i = 0 ; i < 8 ; i ++ ) { long octet = val & 0x00ff ; val = val > > 8 ; hashval = hashval ^ octet ; hashval = hashval * FNV_prime_64 ; } return Math . abs ( hashval ) ; }
64 bit fnv hash . produces more " random " hashes than ( say ) string . hashcode ( ) .
