Up to 1.1.1:
* Fix CityHash32() so platforms that disagree about whether 'char' is
signed use the same mathematical function. For most people this changes
nothing as most popular platforms agree with x86 about whether 'char' is
signed.
* No changes to any of the functions, unless you had been using
CityHash32() despite "make check" reporting a failure on your platform.
* Slightly modernize and improve configuration and portability.
Submitted by: myself
CityHash provides hash functions for strings. The functions mix the
input bits thoroughly but are not suitable for cryptography. See
"Hash Quality," below, for details on how CityHash was tested and so on.
Functions by CityHash:
- CityHash32() returns a 32-bit hash.
- CityHash64() and similar return a 64-bit hash.
- CityHash128() and similar return a 128-bit hash and are tuned for
strings of at least a few hundred bytes. Depending on your compiler
and hardware, it's likely faster than CityHash64() on sufficiently long
strings. It's slower than necessary on shorter strings, but we expect
that case to be relatively unimportant.
- CityHashCrc128() and similar are variants of CityHash128() that depend
on _mm_crc32_u64(), an intrinsic that compiles to a CRC32 instruction
(Only the first 15 lines of the commit message are shown above )