Portability | portable (FFI) |
---|---|
Stability | experimental |
Maintainer | as@hacks.yi.org |
This module implements a binding to Google's CityHash family of hashing functions. You can find more information here: http://code.google.com/p/cityhash/. It implements both the 64-bit and 128-bit interfaces.
Note that CityHash is designed to work on architectures where unaligned reads do not have a large penalty. In practice it is only used at Google on little-endian Intel/AMD CPUs it seems, and has not been tested on big-endian architectures.
- cityHash64 :: ByteString -> Word64
- cityHash128 :: ByteString -> Word128
Hashing values
cityHash64 :: ByteString -> Word64Source
Hash a value into a 64bit result.
cityHash128 :: ByteString -> Word128Source
Hash a value into a 128bit result. Per the google documentation, this is probably faster for inputs which the length is greater than, say, 200 bytes. It's also used inside google for code that wants to have minimal collisions.