Awesome Open Source
Awesome Open Source


Build Status

Very fast universal hash families on strings.

Sample results on a regular x64 (Skylake) processor:

Google's City                        CPU cycle/byte = 0.216047 	 
64-bit VHASH                         CPU cycle/byte = 0.215097 	 
64-bit CLHASH                        CPU cycle/byte = 0.091786 	
SipHash                              CPU cycle/byte = 1.414069

This software includes the experimental code from the following research papers...


Thanks to Nathan Kurz for noticing that GCC 4.7 requires no-tree-vectorize to produce correct results.


To test speed:

make benchmark-target
# disable some processor features that add noise to benchmarks:
cd scripts/; sudo ./; cd ..

To test correctness of hash functions using PCLMULQDQ:

make test-target
for test in ./test/correctness/*.exe; do $test; done

Or more simply...


Related projects

There is a very simple clhash library in C:

For a project with similar goals, see:


This project is licenced as described in the LICENSE file, with the following exceptions for code written by other authors:

  • smhasher and CityHash are MIT licensed.

  • VHASH and siphash are public domain.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
c-plus-plus (17,009
hashing (51

Find Open Source By Browsing 7,000 Topics Across 59 Categories