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.


Keywords
.NET, Array, Buffer, Community, Extensions, Helpers, Memory, Parallel, Performance, Span, Stream, String, StringPool, Toolkit, Unsafe, dotnet, csharp, maui, mvvm, netcore, netframework, netstandard, uno-platform, uwp, wpf
License
MIT
Install
Install-Package CommunityToolkit.HighPerformance -Version 8.0.0

Documentation

🧰 .NET Community Toolkit

.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.

πŸ‘€ What does this repo contain?

This repository contains several .NET libraries (originally developed as part of the Windows Community Toolkit) that can be used both by application developers (regardless on the specific UI framework in use, they work everywhere!) and library authors. These libraries are also being used internally at Microsoft to power many of our first party apps (such as the new Microsoft Store) and constantly improved by listening to feedbacks from other teams, external partners and other developers from the community. Here's a quick breakdown of the various components you'll find in this repository:

Package Latest stable Latest Preview Description
CommunityToolkit.Common CommunityToolkit.Common CommunityToolkit.Common A set of helper APIs shared with other CommunityToolkit libraries.
CommunityToolkit.Diagnostics CommunityToolkit.Diagnostics CommunityToolkit.Diagnostics A set of helper APIs (specifically, Guard and ThrowHelper) that can be used for cleaner, more efficient and less error-prone argument validation and error checking.
CommunityToolkit.HighPerformance CommunityToolkit.HighPerformance CommunityToolkit.HighPerformance A collection of helpers for working in high-performance scenarios. It includes APIs such as pooled buffer helpers, a fast string pool type, a 2D variant of Memory<T> and Span<T> (Memory2D<T> and Span2D<T>) also supporting discontiguous regions, helpers for bit shift operations (such as BitHelper, also used in Paint.NET), and more.
CommunityToolkit.Mvvm (aka MVVM Toolkit) CommunityToolkit.Mvvm CommunityToolkit.Mvvm A fast, modular, platform-agnostic MVVM library, which is the official successor of MvvmLight. It's used extensively in the Microsoft Store and other first party apps. The sample app repository is here.

πŸ™Œ Getting Started

Please read the Getting Started with the .NET Community Toolkit page for more detailed information.

πŸ“ƒ Documentation

All documentation for the toolkit is hosted on Microsoft Docs.

All API documentation can be found at the .NET API Browser.

πŸš€ Contribution

Do you want to contribute?

Check out our .NET Community Toolkit Wiki page to learn more about contribution and guidelines!

πŸ“¦ NuGet Packages

NuGet is a standard package manager for .NET applications which is built into Visual Studio. When you open solution in Visual Studio, choose the Tools menu > NuGet Package Manager > Manage NuGet packages for solution… Enter one of the package names mentioned in .NET Community Toolkit NuGet Packages table to search for it online.

🌍 Roadmap

Read what we plan for next iterations, and feel free to ask questions.

Check out our Preview Packages Wiki Page to learn more about updating your NuGet sources in Visual Studio, then you can also get pre-release packages of upcoming versions to try.

πŸ“„ Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

🏒 .NET Foundation

This project is supported by the .NET Foundation.

πŸ† Contributors

Toolkit Contributors

Made with contrib.rocks.