Skip to main content

dotNET6

FileStream

The System.IO.FileStream type has been rewritten for .NET 6 to provide better performance and reliability on Windows. Now, FileStream never blocks when created for asynchronous I/O on Windows.

Profile-guided optimization

Profile-guided optimization (PGO) is where the JIT compiler generates optimized code in terms of the types and code paths that are most frequently used. .NET 6 introduces dynamic PGO. Dynamic PGO works hand-in-hand with tiered compilation to further optimize code based on additional instrumentation that's put in place during tier 0. Dynamic PGO is disabled by default, but you can enable it with the DOTNET_TieredPGO environment variable.

Crossgen2

.NET 6 introduces Crossgen2, the successor to Crossgen, which has been removed. Crossgen and Crossgen2 are tools that provide ahead-of-time (AOT) compilation to improve the startup time of an app. Crossgen2 is written in C# instead of C++, and can perform analysis and optimization that weren't possible with the previous version.

Arm64 support

The .NET 6 release includes support for macOS Arm64 (or "Apple Silicon") and Windows Arm64 operating systems, for both native Arm64 execution and x64 emulation.

Hot reload

Hot reload is a feature that lets you modify your app's source code and instantly apply those changes to your running app.

C# 10 and templates

C# 10 includes innovations such as global using directives, file-scoped namespace declarations, and record structs.

System.Text.Json APIs

Many improvements have been made in System.Text.Json in .NET 6, such that it is now an "industrial strength" serialization solution.

Writeable DOM

A new, writeable document object model (DOM) has been added, which supplements the pre-existing read-only DOM. 

Comments

Popular posts from this blog

How to retry jquery ajax failure request

$ . ajax ({ url : 'someurl' , type : 'POST' , data : ...., tryCount : 0 , retryLimit : 3 , success : function ( json ) { //do something }, error : function ( xhr , textStatus , errorThrown ) { if ( textStatus == 'timeout' ) { this . tryCount ++; if ( this . tryCount <= this . retryLimit ) { //try again $ . ajax ( this ); return ; } return ; } if ( xhr . status == 500 ) { //handle error } else { //handle error } } });

Memory-Mapped Files

A memory-mapped file contains the contents of a file in virtual memory and is an application’s logical address space. This mapping between a file and memory space enables an application, including multiple processes, to modify the file by reading and writing directly to the memory. Starting with the .NET Framework version 4, you can use managed code to access memory-mapped files in the same way that native Windows functions access memory-mapped files, as described in Managing Memory-Mapped Files in Win32 in the MSDN Library. There are two types of memory-mapped files: Persisted memory-mapped files Persisted files are memory-mapped files that are associated with a source file on a disk. When the last process has finished working with the file, the data is saved to the source file on the disk. These memory-mapped files are suitable for working with extremely large source files. The following illustration shows memory-mapped files that are persisted to disk. Non-persisted memory-mapp