Fast Positive Hash, aka "Позитивный Хэш" by Positive Technologies.
- Created for 64-bit little-endian platforms, in predominantly for x86_64, but without penalties could runs on any 64-bit CPU.
- In most cases up to 15% faster than City64, xxHash, mum-hash, metro-hash and all others which are not use specific hardware tricks.
- Not suitable for cryptography.
Please see t1ha.c for implementation details.
The t1ha was originally developed by Leonid Yuriev (Леонид Юрьев) for The 1Hippeus project - zerocopy messaging in the spirit of Sparta!
- t1ha designed for modern 64-bit architectures.
But on the other hand, t1ha doesn't uses any one tricks nor
instructions specific to any particular architecture:
- therefore t1ha could be used on any CPU for which GCC provides support 64-bit arithmetics.
- but unfortunately t1ha could be dramatically slowly on architectures without native 64-bit operations.
- This implementation of t1ha requires modern GNU C compatible compiler, includes Clang/LLVM; or MSVC++ 14.0 (Visual Studio 2015).
SMHasher is a wellknown test suite designed to test the distribution, collision, and performance properties of non-cryptographic hash functions.
Reini Urban provides extended version/fork of SMHasher which integrates a lot of modern hash functions, including t1ha.
So, the quality and speed of t1ha can be easily checked with the following scenario:
git clone https://github.com/rurban/smhasher
cd smhasher
cmake .
make
./SMHasher City64
./SMHasher metrohash64_1
./SMHasher xxHash64
./SMHasher mum
...
./SMHasher t1ha
For properly performance please use at least GCC 5.4 or Clang 3.8.