src/common/hash.cc
uint64 FingerPrint(const char *s) {
  uint32 high = 0, low = 0;
  for (; (*s) != '\0'; ++s) {
    low = (low << 5) - low + (*s);
    high = (high << 5) + high + (*s);
  }

  return (static_cast<uint64>(high) << 32) + low;
}
// Generate finger print for a string.
// Both 31 and 33 are fast multipliers, which can be implemented by shift and
// add operator. And they are also widely adopted hash function multiplier.
Generate finger print for a string.
Both 31 and 33 are fast multipliers, which can be implemented by shift and
add operator. And they are also widely adopted hash function multiplier.
Generate finger print for a string . Both 31 and 33 are fast multipliers which can be implemented by shift and add operator . And they are also widely adopted hash function multiplier .
uint64 FingerPrint(const char *s) {
  uint32 high = 0, low = 0;
  for (; (*s) != '\0'; ++s) {
    low = (low << 5) - low + (*s);
    high = (high << 5) + high + (*s);
  }
  return (static_cast<uint64>(high) << 32) + low;
}
uint64 FingerPrint ( const char * s ) { uint32 high = 0 , low = 0 ; for ( ; ( * s ) != ' \0 ' ; ++ s ) { low = ( low << 5 ) - low + ( * s ) ; high = ( high << 5 ) + high + ( * s ) ; } return ( static_cast < uint64 > ( high ) << 32 ) + low ; }
Generate finger print for a string.
Generate finger print for a string .