Skip to main content
CommunityToolkit.HighPerformance package icon

CommunityToolkit.HighPerformance

This package includes high performance .NET helpers such as: - Memory2D<T> and Span2D<T>: two types providing fast and allocation-free abstraction over 2D memory areas. - ArrayPoolBufferWriter<T>: an IBufferWriter<T> implementation using pooled arrays, which also supports IMemoryOwner<T>. - MemoryBufferWriter<T>: an IBufferWriter<T>: implementation that can wrap external Memory<T>: instances. - MemoryOwner<T>: an IMemoryOwner<T> implementation with an embedded length and a fast Span<T> accessor. - SpanOwner<T>: a stack-only type with the ability to rent a buffer of a specified length and getting a Span<T> from it. - StringPool: a configurable pool for string instances that be used to minimize allocations when creating multiple strings from char buffers. - String, array, Memory<T>, Span<T> extensions and more, all focused on high performance. - HashCode<T>: a SIMD-enabled extension of HashCode to quickly process sequences of values. - BitHelper: a class with helper methods to perform bit operations on numeric types. - ParallelHelper: helpers to work with parallel code in a highly optimized manner. - Box<T>: a type mapping boxed value types and exposing some utility and high performance methods. - Ref<T>: a stack-only struct that can store a reference to a value of a specified type. - NullableRef<T>: a stack-only struct similar to Ref<T>, which also supports nullable references.

Total Downloads
39.7M
39,745,452
Published
Nov 27, 2024
Latest stable version

Install

.NET CLI
dotnet add package CommunityToolkit.HighPerformance --version 8.4.0-preview3
Package Manager Console
Install-Package CommunityToolkit.HighPerformance -Version 8.4.0-preview3
PackageReference
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.4.0-preview3" />

Frameworks

net7.0 net8.0 .NETStandard2.0 .NETStandard2.1

Dependencies

Microsoft.Bcl.HashCode
.NETStandard2.0
[1.1.1, )
System.Memory
.NETStandard2.0
[4.5.5, )
[4.5.4, )

Adoption guide

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.

Compatibility metadata lists 4 target frameworks; confirm the exact target used by your application.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.