Faster.Collections.Pooled 1.0.3

dotnet add package Faster.Collections.Pooled --version 1.0.3
                    
NuGet\Install-Package Faster.Collections.Pooled -Version 1.0.3
                    
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="Faster.Collections.Pooled" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Faster.Collections.Pooled" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Faster.Collections.Pooled" />
                    
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 Faster.Collections.Pooled --version 1.0.3
                    
#r "nuget: Faster.Collections.Pooled, 1.0.3"
                    
#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 Faster.Collections.Pooled@1.0.3
                    
#: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=Faster.Collections.Pooled&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Faster.Collections.Pooled&version=1.0.3
                    
Install as a Cake Tool

Faster.Collections.Pooled

A high-performance collection library for .NET 10+ that provides pooled alternatives to standard collections, reducing GC pressure and improving throughput.

Features

  • Array Pooling - All collections leverage shared array pools to minimize allocations
  • High-Performance Hashing - Includes optimized hash algorithms (FastHash, WyHash, xxHash3, CRC32) powered by Faster.Map.
  • Drop-in Replacements - Compatible APIs for Dictionary, List, Queue, Stack, and PriorityQueue.
  • Comprehensive Testing - Includes comparison tests against BCL collections.
  • Benchmarking - Includes a dedicated benchmarking project for performance evaluation.

API Compatibility

Collection API Source
PooledList List
PooledQueue Queue
PooledStack Stack
PooledPriorityQueue PriorityQueue
PooledDictionary FasterMap.BlitzMap + Interfaces* of Dictionary

* PooledDictionary implements standard interfaces of Dictionary except ISerializable and IDeserializationCallback

Special API

ToPooledCollection Series

using PooledList<int> list = [1, 2, 3, 4, 5];
list.ToPooledQueue();          // Convert to PooledQueue
list.ToPooledStack();          // Convert to PooledStack

Deque

using new PooledDeque<int> deque = [];
deque.EnququeHead(1);
deque.EnququeTail(2);

Construction based on Collection Expression

using PooledDeque<int> deque = [0];
using PooledDictionary<int, int> dict = [ 
    (1, 1), 
    (2, 2),
    (3, 3), 
];

Installation

NuGet Package

dotnet add package Faster.Collections.Pooled

Build from Source

dotnet fsi build.fsx build

Performance

Sometimes, benchmark-dotnet or GC will allocate small amount of memory.
For exmaple, the benchmark below shows System.Collections.Generic.PriorityQueue.Dequeue allocates 0 B, but it may allocate a few bytes in some runs.

Method N Mean Error StdDev Median Ratio RatioSD Allocated Alloc Ratio
OriginPriorityQueueDequeue 100 2,741.8 ns 168.45 ns 472.36 ns 2,700.0 ns 1.03 0.24 336 B 1.00
PooledPriorityQueueDequeue 100 2,847.4 ns 158.32 ns 454.26 ns 2,800.0 ns 1.07 0.24 - 0.00
OriginPriorityQueueDequeue 1000 41,531.0 ns 826.78 ns 1,211.88 ns 41,400.0 ns 1.00 0.04 - NA
PooledPriorityQueueDequeue 1000 42,242.9 ns 783.69 ns 694.72 ns 42,250.0 ns 1.02 0.03 - NA

PooledList vs List

Add

List_Add

Speed up 85%, no allocations.

Remove

List_Remove

Almost same speed, no allocations.

PooledDictionary vs Dictionary

Dictionary_Add

Speed up 298%, no allocations.

Dictionary_Remove

Speed up 58%, no allocations.

PooledQueue vs Queue

Enqueue

Queue_Enqueue

Speed up 65%, no allocations.

Dequeue

Queue_Dequeue

Almost same speed, no allocations.

PooledStack vs Stack

Push

Stack_Push

Speed up 86%, no allocations.

Pop

Stack_Pop

Almost same speed, no allocations.

PooledPriorityQueue vs PriorityQueue

Enqueue

PriorityQueue_Enqueue

Speed up 71%, no allocations.

Dequeue

PriorityQueue_Dequeue

Almost same speed, no allocations.

Roadmap

  • PooledHashset (based on Faster.Map.BlitzSet)
  • ISerializable and IDeserializationCallback support for PooledDictionary

Acknowledgments

Very special thanks to the following projects:

License

MIT License

Product Compatible and additional computed target framework versions.
.NET 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 165 1/27/2026
1.0.2 144 1/25/2026
1.0.1 140 1/25/2026
1.0.0 142 1/25/2026