ValueCollections 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ValueCollections --version 1.2.0
                    
NuGet\Install-Package ValueCollections -Version 1.2.0
                    
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="ValueCollections" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ValueCollections" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="ValueCollections" />
                    
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 ValueCollections --version 1.2.0
                    
#r "nuget: ValueCollections, 1.2.0"
                    
#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.
#addin nuget:?package=ValueCollections&version=1.2.0
                    
Install ValueCollections as a Cake Addin
#tool nuget:?package=ValueCollections&version=1.2.0
                    
Install ValueCollections as a Cake Tool

ValueCollections

NuGet

A set of collections in C# implemented as ref struct to minimize heap allocations.

ValueList

An implementation of IList<T> using spans and array pools.

using ValueList<int> list = [];

for (int i = 0; i < 100; i++) {
    list.Add(i);
}

Console.WriteLine(string.Join(", ", list.ToList()));

Benchmarks

Method Mean Error StdDev Gen0 Allocated
SmallListOfStruct 17.92 ns 0.122 ns 0.114 ns 0.0255 80 B
SmallValueListOfStruct 15.14 ns 0.050 ns 0.047 ns - -
SmallListOfClass 25.69 ns 0.077 ns 0.069 ns 0.0306 96 B
SmallValueListOfClass 18.36 ns 0.037 ns 0.033 ns - -
LargeListOfStruct 21,131.86 ns 119.642 ns 111.913 ns 41.6565 131400 B
LargeValueListOfStruct 7,454.80 ns 11.838 ns 10.494 ns - -

Special Thanks

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

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
3.2.0 126 4/1/2025
3.1.0 118 3/31/2025
3.0.0 120 3/31/2025
2.1.0 428 3/26/2025
2.0.0 243 3/24/2025
1.3.0 237 3/23/2025
1.2.0 240 3/23/2025
1.1.0 234 3/23/2025
1.0.0 237 3/23/2025