Celerity.Hashing
2.4.0
See the version list below for details.
dotnet add package Celerity.Hashing --version 2.4.0
NuGet\Install-Package Celerity.Hashing -Version 2.4.0
<PackageReference Include="Celerity.Hashing" Version="2.4.0" />
<PackageVersion Include="Celerity.Hashing" Version="2.4.0" />
<PackageReference Include="Celerity.Hashing" />
paket add Celerity.Hashing --version 2.4.0
#r "nuget: Celerity.Hashing, 2.4.0"
#:package Celerity.Hashing@2.4.0
#addin nuget:?package=Celerity.Hashing&version=2.4.0
#tool nuget:?package=Celerity.Hashing&version=2.4.0
Celerity.Hashing
Zero-cost struct hash providers and hash-quality tooling. Part of the Celerity family of high-performance .NET libraries.
The hashers are structs implementing IHashProvider<T>, so when a Celerity
collection is parameterised on one the JIT devirtualizes and inlines the hash
call — there is no interface dispatch on the hot path. They are positioned on
distribution quality (avalanche), determinism, and adversarial resistance —
not on beating GetHashCode() for raw speed (for int keys it can't:
int.GetHashCode() is identity, i.e. zero work).
What's in the box
IHashProvider<T>— the one-method (int Hash(T)) contract every hasher implements; the generic constraintwhere THasher : struct, IHashProvider<T>is what makes the collections zero-cost.- Integer hashers —
Int32IdentityHasher/Int64IdentityHasher(the zero-work floor),*WangNaiveHasher,*WangHasher,*Murmur3Hasheracrossint/long/uint/ulong, plusGuidHasher. - String hashers — a wide ladder from cheap (
Djb2,Sdbm,Fnv1a) to strong/keyed (Murmur3,xxHash3,SipHash13/24,HighwayHash64,MetroHash64, …). See the docs for the speed-vs-quality tradeoff and the HashDoS caveat (fixed-seed hashers are not a flooding defence). DefaultHasher<T>— fallback toEqualityComparer<T>.Default.GetHashCode().HashQualityEvaluator— collision rate, bucket occupancy, chi-squared and a normalized distribution score for a candidate hasher / key shape.ProbeStatisticsEvaluator— replays the real open-addressed linear-probing placement to report average / worst-case probe length end-to-end.
See the hashing API reference for full docs, the "choosing a hasher" guide, and runnable examples.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Celerity.Primitives (>= 2.4.0)
-
net8.0
- Celerity.Primitives (>= 2.4.0)
-
net9.0
- Celerity.Primitives (>= 2.4.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Celerity.Hashing:
| Package | Downloads |
|---|---|
|
Celerity.Collections
High-performance .NET dictionaries, sets, frozen/perfect-hash collections, and probabilistic sketches (Bloom, HyperLogLog, Count-Min) built on zero-cost struct hashers. As of the 2.0.0 split this package transitively pulls in Celerity.Hashing and Celerity.Primitives, so existing consumers keep working unchanged. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.4.1-beta.4 | 24 | 7/26/2026 |
| 2.4.0 | 39 | 7/26/2026 |
| 2.3.1-beta.15 | 50 | 7/25/2026 |
| 2.3.1-beta.8 | 54 | 7/23/2026 |
| 2.3.1-beta.2 | 54 | 7/22/2026 |
| 2.3.0 | 167 | 7/19/2026 |
| 2.2.1-beta.24 | 70 | 7/18/2026 |
| 2.2.1-beta.18 | 63 | 7/14/2026 |
| 2.2.1-beta.15 | 67 | 7/12/2026 |
| 2.2.1-beta.13 | 51 | 7/11/2026 |
| 2.2.1-beta.12 | 57 | 7/10/2026 |
| 2.2.1-beta.5 | 54 | 7/9/2026 |
| 2.2.1-beta.4 | 60 | 7/8/2026 |
| 2.2.1-beta.3 | 60 | 7/7/2026 |
| 2.2.1-beta.2 | 58 | 7/6/2026 |
| 2.2.0 | 122 | 7/5/2026 |
| 2.1.1-beta.4 | 59 | 7/4/2026 |
| 2.1.1-beta.2 | 60 | 7/2/2026 |
| 2.1.1-beta.1 | 60 | 7/1/2026 |
| 2.1.0 | 134 | 6/30/2026 |