Small, Fast, Portable 64-bit hash function
145
stars
10
commits
C
primary language
Apr 21, 2026
updated
I started writing this because all the 64 bit hash functions I came across were either too slow (FNV-1a, one byte at a time processing), or too large spanning hundreds of lines of code, or non-portable due to using hardware specific instructions. Being small and portable, the goal is to be able to use ChibiHash as a good "default" for non-cryptographic 64-bit hashing needs.
Some key features:
Here's some benchmark (made via smhasher3) against other similar themed hash functions:
| Name | Large input (GiB/sec) | Small input (Cycles/Hash) |
|---|---|---|
| chibihash64 | 24.20 | 34 |
| xxhash64 | 15.10 | 50 |
| city64 | 18.30 | 47 |
| spooky64 | 16.68 | 70 |
| rapidhash.protected 1 | 21.50 | 32 |
| polymur-hash 1, 2 | 13.82 | 43 |
The introduction should make it clear on why you'd want to use this. Here are some reasons to avoid using this:
A list of unofficial ports to other languages is maintained here.
10 commits
C
98.7%
C++
1.3%
Small, Fast, Portable 64-bit hash function
145
stars
10
commits
C
primary language
Apr 21, 2026
updated
I started writing this because all the 64 bit hash functions I came across were either too slow (FNV-1a, one byte at a time processing), or too large spanning hundreds of lines of code, or non-portable due to using hardware specific instructions. Being small and portable, the goal is to be able to use ChibiHash as a good "default" for non-cryptographic 64-bit hashing needs.
Some key features:
Here's some benchmark (made via smhasher3) against other similar themed hash functions:
| Name | Large input (GiB/sec) | Small input (Cycles/Hash) |
|---|---|---|
| chibihash64 | 24.20 | 34 |
| xxhash64 | 15.10 | 50 |
| city64 | 18.30 | 47 |
| spooky64 | 16.68 | 70 |
| rapidhash.protected 1 | 21.50 | 32 |
| polymur-hash 1, 2 | 13.82 | 43 |
The introduction should make it clear on why you'd want to use this. Here are some reasons to avoid using this:
A list of unofficial ports to other languages is maintained here.
10 commits
C
98.7%
C++
1.3%