Evenementer
Mar 17, 11 PM - Mar 21, 11 PM
Maacht mat bei der Meetup-Serie, fir skaléierbar KI-Léisungen op Basis vu realistesche Benotzungsfäll mat aneren Entwéckler an Experten ze bauen.
Elo umellenDëse Browser gëtt net méi ënnerstëtzt.
Upgrat op Microsoft Edge fir vun de Virdeeler vun leschten Eegeschaften, Sécherheetsupdaten, an techneschem Support ze profitéieren.
The CommunityToolkit.HighPerformance
contains helpers and extensions to work in high-performance scenarios. This package can be installed through NuGet, and it has the following multi-targets:
This means that you can use it from anything from UWP or legacy .NET Framework applications, games written in Unity, cross-platform mobile applications using Xamarin, to .NET Standard libraries and modern .NET 6 and .NET 7 applications. The API surface is almost identical in all cases, and lots of work has been put into backporting as many features as possible to older targets like .NET Standard 2.0. Except for some minor differences, you can expect the same APIs to be available on all target frameworks. The reason why multi-targeting has been used is to allow the package to leverage all the latest APIs on modern runtimes (like .NET 7) whenever possible, while still offering most of its functionalities to all target platforms.
To install the package from within Visual Studio:
In Solution Explorer, right-click on the project and select Manage NuGet Packages. Search for CommunityToolkit.HighPerformance and install it.
Add a using or Imports directive to use the new APIs:
using CommunityToolkit.HighPerformance;
Imports CommunityToolkit.HighPerformance
Code samples are available in the other docs pages for the MVVM Toolkit, and in the unit tests for the project.
As the name suggests, the High Performance package contains a set of APIs that are heavily focused on optimization. All the new APIs have been carefully crafted to achieve the best possible performance when using them, either through reduced memory allocation, micro-optimizations at the assembly level, or by structuring the APIs in a way that facilitates writing performance oriented code in general.
This package makes heavy use of APIs such as:
System.Span<T>
System.Memory<T>
System.Buffers.ArrayPool<T>
System.Runtime.CompilerServices.Unsafe
System.Runtime.InteropServices.MemoryMarshal
System.Threading.Tasks.Parallel
If you are already familiar with these APIs or even if you're just getting started with writing high performance code in C# and want a set of well tested helpers to use in your own projects, have a look at what's included in this package to see how you can use it in your own projects!
Here are some APIs you could look at first, if you were already using one of those types mentioned above:
Span2D<T>
and Memory2D<T>
, for a Span<T>
and Memory<T>
-like abstraction over 2D memoryMemoryOwner<T>
and SpanOwner<T>
, if you were using System.Buffers.ArrayPool<T>
.StringPool
, for an ArrayPool<T>
-like type to cache string
instancesParallelHelper
, if you were using System.Threading.Tasks.Parallel
.You can find more examples in the unit tests.
Feedback zu .NET Community Toolkit
.NET Community Toolkit ass en Open-Source-Projet. Wielt e Link, fir Feedback ze ginn:
Evenementer
Mar 17, 11 PM - Mar 21, 11 PM
Maacht mat bei der Meetup-Serie, fir skaléierbar KI-Léisungen op Basis vu realistesche Benotzungsfäll mat aneren Entwéckler an Experten ze bauen.
Elo umellenTraining
Léierwee
Run high-performance computing (HPC) applications on Azure - Training
Azure HPC is a purpose-built cloud capability for HPC & AI workload, using leading-edge processors and HPC-class InfiniBand interconnect, to deliver the best application performance, scalability, and value. Azure HPC enables users to unlock innovation, productivity, and business agility, through a highly available range of HPC & AI technologies that can be dynamically allocated as your business and technical needs change. This learning path is a series of modules that help you get started on Azure HPC - you
Dokumentatioun
ParallelHelper - Community Toolkits for .NET
Helpers to work with parallel code in a highly optimized manner
Span2D<T> and ReadOnlySpan2D<T> - Community Toolkits for .NET
A stack-only type that mirrors the behavior of Span<T> and ReadOnlySpan<T>, but supporting arbitrary 2D memory locations
Memory2D<T> and ReadOnlyMemory2D<T> - Community Toolkits for .NET
A value type that mirrors the behavior of Memory<T> and ReadOnlyMemory<T> with the addition of supporting arbitrary 2D memory locations