Home

Awesome

FastHashes

FashHashes is a suite of .NET non-cryptographic hash functions.

<table> <tr> <td align="right">Status:</td> <td align="left"> <a href="https://github.com/TommasoBelluzzo/FastHashes/actions/workflows/continuous_integration.yml"><img alt="Build" src="https://img.shields.io/github/workflow/status/TommasoBelluzzo/FastHashes/Continuous%20Integration?style=flat&label=Build&color=1081C2"/></a> <a href="https://coveralls.io/github/TommasoBelluzzo/FastHashes?branch=master"><img alt="Coverage" src="https://img.shields.io/coveralls/github/TommasoBelluzzo/FastHashes?style=flat&label=Coverage&color=1081C2"/></a> </td> </tr> <tr> <td align="right">Info:</td> <td align="left"> <a href="#"><img alt="License" src="https://img.shields.io/github/license/TommasoBelluzzo/FastHashes?style=flat&label=License&color=1081C2"/></a> <a href="#"><img alt="Lines" src="https://img.shields.io/tokei/lines/github/TommasoBelluzzo/FastHashes?style=flat&label=Lines&color=1081C2"/></a> <a href="#"><img alt="Size" src="https://img.shields.io/github/repo-size/TommasoBelluzzo/FastHashes?style=flat&label=Size&color=1081C2"/></a> </td> </tr> <tr> <td align="right">NuGet:</td> <td align="left"> <a href="https://www.nuget.org/packages/FastHashes/"><img alt="Version" src="https://img.shields.io/nuget/v/FastHashes?style=flat&label=Version"/></a> <a href="https://www.nuget.org/packages/FastHashes/"><img alt="Downloads" src="https://img.shields.io/nuget/dt/FastHashes?style=flat&label=Downloads&color=1081C2"/></a> </td> </tr> <tr> <td align="right">Donation:</td> <td align="left"> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=T8X35C2FED9SU"><img alt="PayPal" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"/></a> </td> </tr> </table>

Main Features

Hashes

The library includes the following non-cryptographic hashes:

Requirements

The following Frameworks are supported:

The following NuGet packages are required for performing unit tests:

Performance Benchmarks

Hash RankHash NameBulk Speed Test Average ↓Chunks Speed Test Average
-DummyHash (Reference)609.34 GB/s2.06 GB/s
1FarmHash6411.47 GB/s626.60 MB/s
2FarmHash12811.27 GB/s641.03 MB/s
3MetroHash128-V111.11 GB/s636.52 MB/s
4MetroHash64-V111.10 GB/s628.81 MB/s
5MetroHash128-V211.06 GB/s635.34 MB/s
6MetroHash64-V211.05 GB/s620.92 MB/s
7XxHash6410.03 GB/s596.90 MB/s
8Mx3Hash9.31 GB/s545.03 MB/s
9PengyHash8.73 GB/s517.22 MB/s
10MurmurHash128-x646.70 GB/s485.59 MB/s
11MurmurHash64-x646.56 GB/s467.14 MB/s
12XxHash326.43 GB/s482.92 MB/s
13FastHash645.34 GB/s444.45 MB/s
14FastHash325.26 GB/s440.91 MB/s
15WyHash324.38 GB/s389.76 MB/s
16FarmHash324.27 GB/s394.83 MB/s
17FastPositiveHash-V14.10 GB/s386.51 MB/s
18MurmurHash128-x864.05 GB/s383.60 MB/s
19MurmurHash64-x864.01 GB/s374.73 MB/s
20FastPositiveHash-V23.99 GB/s386.33 MB/s
21MurmurHash322.82 GB/s332.35 MB/s
22MumHash2.44 GB/s312.24 MB/s
23WyHash642.39 GB/s340.13 MB/s
24KomiHash2.31 GB/s331.88 MB/s
25FastPositiveHash-V02.29 GB/s320.69 MB/s
26MirHash2.03 GB/s298.14 MB/s
27SipHash-131.28 GB/s230.67 MB/s
28HighwayHash256914.16 MB/s125.78 MB/s
29HighwayHash64899.65 MB/s151.54 MB/s
30HighwayHash128883.51 MB/s143.84 MB/s
31SpookyHash32752.43 MB/s156.79 MB/s
32SpookyHash64734.84 MB/s149.36 MB/s
33SipHash-24734.74 MB/s168.43 MB/s
34SpookyHash128723.91 MB/s155.67 MB/s
35HalfSipHash364.78 MB/s119.96 MB/s

The tests above have been conducted with the following machine setup: