Celerity.Hashing
2.6.0
See the version list below for details.
dotnet add package Celerity.Hashing --version 2.6.0
NuGet\Install-Package Celerity.Hashing -Version 2.6.0
<PackageReference Include="Celerity.Hashing" Version="2.6.0" />
<PackageVersion Include="Celerity.Hashing" Version="2.6.0" />
<PackageReference Include="Celerity.Hashing" />
paket add Celerity.Hashing --version 2.6.0
#r "nuget: Celerity.Hashing, 2.6.0"
#:package Celerity.Hashing@2.6.0
#addin nuget:?package=Celerity.Hashing&version=2.6.0
#tool nuget:?package=Celerity.Hashing&version=2.6.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.6.0)
-
net8.0
- Celerity.Primitives (>= 2.6.0)
-
net9.0
- Celerity.Primitives (>= 2.6.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.7.1-beta.6 | 69 | 8/24/2026 |
| 2.7.1-beta.5 | 82 | 8/20/2026 |
| 2.7.1-beta.2 | 82 | 8/19/2026 |
| 2.7.0 | 932 | 8/18/2026 |
| 2.6.1-beta.13 | 94 | 8/18/2026 |
| 2.6.1-beta.10 | 74 | 8/15/2026 |
| 2.6.1-beta.6 | 82 | 8/14/2026 |
| 2.6.1-beta.3 | 75 | 8/11/2026 |
| 2.6.1-beta.2 | 65 | 8/10/2026 |
| 2.6.1-beta.1 | 82 | 8/9/2026 |
| 2.6.0 | 1,572 | 8/9/2026 |
| 2.5.1-beta.12 | 75 | 8/8/2026 |
| 2.5.1-beta.6 | 68 | 8/7/2026 |
| 2.5.1-beta.4 | 71 | 8/5/2026 |
| 2.5.1-beta.2 | 75 | 8/3/2026 |
| 2.5.1-beta.1 | 74 | 8/2/2026 |
| 2.5.0 | 1,364 | 8/2/2026 |
| 2.4.1-beta.13 | 73 | 8/1/2026 |
| 2.4.1-beta.12 | 75 | 7/31/2026 |
| 2.4.1-beta.11 | 67 | 7/30/2026 |