Faster.Map is a blazing-fast, memory-efficient HashMap library for .NET.
It’s built to outperform Dictionary<TKey,TValue> and ConcurrentDictionary<TKey,TValue> by providing SIMD acceleration, lock-free concurrency, and custom hashing algorithms.
Designed for real-time systems, game engines, caching layers, and data-intensive applications, Faster.Map delivers exceptional speed, scalability, and predictable performance across varying load factors.
The goal of Faster.Map is to create a more efficient and performant alternative to .NET’s built-in Dictionary and ConcurrentDictionary.
While those are reliable, they can struggle under high-density workloads, frequent concurrent operations, or tight memory constraints.
Faster.Map solves those problems by providing specialized implementations optimized for different workloads.
Harnesses SIMD (Single Instruction, Multiple Data) instructions for parallel key comparisons, drastically reducing lookup latency. ✅ Best for high-density datasets, real-time lookups, and CPU-bound workloads.
Uses Robin Hood hashing to evenly distribute probe distances, minimizing clustering. ✅ Ideal for retrieval-heavy applications and balanced workloads.
A thread-safe, lock-free, open-addressing HashMap using quadratic probing and Fibonacci hashing. ✅ Perfect for multi-threaded environments requiring high throughput and minimal contention.
Employs a linked bucket approach similar to separate chaining but optimized for cache locality and collision resilience. ✅ The fastest all-round implementation, ideal for general-purpose and low-latency workloads.
- Available Implementations
- Installation
- Basic Usage
- Advanced Usage
- Selecting the Right Hashmap
- Tested Platforms
- Benchmarks
Install Faster.Map via NuGet:
Install-Package Faster.MapSupports .NET 6+, .NET 8, .NET Framework 4.8, and cross-platform (x86, x64, ARM, ARM64).
var map = new BlitzMap<int, string>();
map.Insert(1, "Value One");
map.Insert(2, "Value Two");
map.InsertUnique(3, "Value Four");
map.InsertOrUpdate(2, "Updated");
if (map.Get(1, out var value))
Console.WriteLine($"Key 1 has value: {value}");
map.Update(1, "Updated value one");
map.Remove(1);
var n = new BlitzMap<uint, uint>();
n.Insert(1,1);
map.Copy(n);var map = new DenseMap<int, string>();
map.Emplace(1, "Value One");
map.Emplace(2, "Value Two");
if (map.Get(1, out var value))
Console.WriteLine($"Key 1 has value: {value}");
map.Remove(1);Faster.Map supports pluggable hash functions for maximum performance:
- WyHash – High-speed general purpose hashing.
- XXHash3 – Optimized for throughput and low latency.
- FastHash – AES-based hashing (requires X86Aes support).
Example:
var map = new BlitzMap<int, string, XxHash3StringHasher>();
map.Insert(1, "Value One");
map.Insert(2, "Value Two");All hashers are in the Faster.Map.Hasher namespace.
👉 Custom hashing significantly improves lookup speed and reduces collisions in large datasets.
- x86
- x64
- ARM
- ARM64
| Implementation | Best Use Case |
|---|---|
| DenseMap | High-density datasets, SIMD-accelerated lookups |
| RobinHoodMap | Retrieval-heavy workloads, stable latency |
| CMap | Lock-free multi-threaded performance |
| BlitzMap | General-purpose speed and consistent performance |
✅ Recommendation:
Use BlitzMap for balanced performance, DenseMap for dense tables, RobinHoodMap for read-heavy workloads, and CMap for multi-threaded use.
(All benchmarks executed with BenchmarkDotNet v0.13.12 on .NET 9, Intel i5-12500H)
These benchmarks demonstrate how Faster.Map compares to Dictionary<TKey,TValue> across GET, INSERT, UPDATE, REMOVE, and ENUMERATE workloads at various load factors.
🏆 BlitzMap is the most consistent performer across all load factors.
🚀 DenseMap excels at high densities via SIMD acceleration.
🔻 Dictionary suffers from excessive collisions.
Conclusion:
For balanced workloads, choose BlitzMap; for dense workloads, choose DenseMap.
🏆 BlitzMap remains the fastest overall.
🚀 DenseMap shines at high load factors.
🔻 Dictionary performs poorly under heavy loads.
Conclusion:
BlitzMap is the best general performer; DenseMap dominates full tables.
🏆 BlitzMap leads beyond 0.5 load factor.
⚡ RobinhoodMap dominates at lower densities.
🚀 DenseMap struggles at low densities due to SIMD overhead.
Conclusion:
Use RobinhoodMap for sparse data; BlitzMap for dense updates.
🏆 RobinhoodMap offers best scaling for removals.
🚀 Dictionary wins at low densities.
Conclusion:
Choose RobinhoodMap for removal-heavy workloads.
🏆 BlitzMap is fastest across all load factors.
⚡ RobinhoodMap and DenseMap degrade significantly at high densities.
Conclusion:
For frequent iteration, BlitzMap is unmatched.
🏆 BlitzMap scales best; Dictionary wins at low density.
🚀 DenseMap struggles with string hashing.
Conclusion:
For large string keys, use BlitzMap.
🏆 BlitzMap + FastHash is fastest overall.
🧠 WyHash and XXHash3 perform better than defaults.
Conclusion:
Use FastHash for best string lookup performance.
🏆 Dictionary dominates at low load factors.
🚀 BlitzMap maintains performance at high densities.
Conclusion:
Dictionary wins for small tables; BlitzMap wins for scalability.
🏆 BlitzMapFastHash is the clear winner.
WyHash and XXHash3 are strong alternatives.
Dictionary performs worst at scale.
Conclusion:
For high-performance string key lookups, BlitzMapFastHash delivers the best scalability and speed.
hashmap, fast dictionary, csharp, dotnet, lock-free, simd, memory-efficient, high-performance, collections, data-structures, xxhash, wyhash, fast-hashmap, performance-benchmark








