Celerity.Hashing 1.5.1-beta.23

This is a prerelease version of Celerity.Hashing.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Celerity.Hashing --version 1.5.1-beta.23
                    
NuGet\Install-Package Celerity.Hashing -Version 1.5.1-beta.23
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Celerity.Hashing" Version="1.5.1-beta.23" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Celerity.Hashing" Version="1.5.1-beta.23" />
                    
Directory.Packages.props
<PackageReference Include="Celerity.Hashing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Celerity.Hashing --version 1.5.1-beta.23
                    
#r "nuget: Celerity.Hashing, 1.5.1-beta.23"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Celerity.Hashing@1.5.1-beta.23
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Celerity.Hashing&version=1.5.1-beta.23&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Celerity.Hashing&version=1.5.1-beta.23&prerelease
                    
Install as a Cake Tool

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 constraint where THasher : struct, IHashProvider<T> is what makes the collections zero-cost.
  • Integer hashersInt32IdentityHasher / Int64IdentityHasher (the zero-work floor), *WangNaiveHasher, *WangHasher, *Murmur3Hasher across int / long / uint / ulong, plus GuidHasher.
  • 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 to EqualityComparer<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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.2.1-beta.18 50 7/14/2026
2.2.1-beta.15 62 7/12/2026
2.2.1-beta.13 48 7/11/2026
2.2.1-beta.12 52 7/10/2026
2.2.1-beta.5 50 7/9/2026
2.2.1-beta.4 56 7/8/2026
2.2.1-beta.3 56 7/7/2026
2.2.1-beta.2 52 7/6/2026
2.2.0 119 7/5/2026
2.1.1-beta.4 58 7/4/2026
2.1.1-beta.2 59 7/2/2026
2.1.1-beta.1 59 7/1/2026
2.1.0 133 6/30/2026
2.0.1-beta.5 63 6/26/2026
2.0.1-beta.4 72 6/25/2026
2.0.1-beta.2 59 6/24/2026
2.0.1-beta.1 67 6/22/2026
2.0.0 133 6/21/2026
1.5.1-beta.28 60 6/20/2026
1.5.1-beta.23 62 6/15/2026
Loading failed