CommunityToolkit.HighPerformance Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Classes
ArrayExtensions |
Helpers for working with the Array type. |
ArrayPoolBufferWriterExtensions |
Helpers for working with the ArrayPoolBufferWriter<T> type. |
ArrayPoolExtensions |
Helpers for working with the ArrayPool<T> type. |
BoolExtensions |
Helpers for working with the Boolean type. |
Box<T> |
A
In this example, it is not possible to know in advance what type is actually being boxed in a given Object instance, making the code less robust at build time. The Box<T> type can be used as a drop-in replacement in this case, like so:
This type can also be useful when dealing with large custom value types that are also boxed, as it allows to retrieve a mutable reference to the boxing value. This means that a given boxed value can be mutated in-place, instead of having to allocate a new updated boxed instance. |
BoxExtensions |
Helpers for working with the Box<T> type. |
HashCodeExtensions |
Helpers for working with the HashCode type. |
IBufferWriterExtensions |
Helpers for working with the IBufferWriter<T> type. |
IMemoryOwnerExtensions |
Helpers for working with the IMemoryOwner<T> type. |
MemoryExtensions |
Helpers for working with the Memory<T> type. |
ReadOnlyMemoryExtensions |
Helpers for working with the ReadOnlyMemory<T> type. |
ReadOnlySpanExtensions |
Helpers for working with the ReadOnlySpan<T> type. |
SpanExtensions |
Helpers for working with the Span<T> type. |
SpinLockExtensions |
Helpers for working with the SpinLock type. |
StreamExtensions |
Helpers for working with the Stream type. |
StringExtensions |
Helpers for working with the String type. |
Structs
Memory2D<T> |
Memory2D<T> represents a 2D region of arbitrary memory. It is to Span2D<T> what Memory<T> is to Span<T>. For further details on how the internal layout is structured, see the docs for Span2D<T>. The Memory2D<T> type can wrap arrays of any rank, provided that a valid series of parameters for the target memory area(s) are specified. |
ReadOnlyMemory2D<T> |
A readonly version of Memory2D<T>. |
ReadOnlyRef<T> |
A |
ReadOnlySpan2D<T>.Enumerator |
Provides an enumerator for the elements of a ReadOnlySpan2D<T> instance. |
ReadOnlySpan2D<T> | |
Ref<T> |
A |
Span2D<T>.Enumerator |
Provides an enumerator for the elements of a Span2D<T> instance. |
Span2D<T> | |
SpinLockExtensions.Lock |
A |
SpinLockExtensions.UnsafeLock |
A |