tstack/lnav — pull request #69 by sureshsundriyal (2014-02-04 07:21:58+00:00)
Title: Replace SHA-1 with Spookyhash.

* This change removes the external dependency on OpenSSL, which should
allow the code to compile on Mac OS X without specifying the
MAC_OS_X_VERSION_MIN_REQUIRED non-sense.
* Spookyhash should be faster than SHA-1's Merkle-Damgård construction.
- It is optimized for 64-bit machines but shouldn't be any slower than SHA-1
on a 32-bit system.
* Spookyhash is only 128-bits as opposed to SHA-1's 160-bits so memory
consumption should be less. I doubt it will lead to too many
collisions.
* The docs are updated to reflect the fact that OpenSSL is not a
dependency.
* Tested on Linux & Mac OS X.
* Considered implementing a progressive hasing version of Murmur3 but it
seems to have two separate implementations for 64-bit and 32-bit systems
and it gets kludgy to have separate macros for compiling the correct code in.
* Considered CityHash, but read about it using processor specific instructions for
speed up.
* Considered implementing a progressive hashing version of FNV hash but the
128-bit construction would actually require uint128_t thus complicating portability
and performance.