It's Finally Here - .NET 6

There have been weeks of hypotheses, talks, and leaks, and now after all the wait, Microsoft has officially launched .NET 6 RC 1. From both the versions this one is initial; it will go into production and live as well. 

The launch offers plenty of exciting optimization enhancements, exceptional performance, and the latest features, as well. Let’s take a quick look at a few vital features offered by .NET 6. 

⚑ Profile Guided Optimization 

It is a vital capability for numerous development platforms which exist today. The novelty hinges on presuming that the initially executed code is consistent, resulting in enhanced performance when used.

There are huge and important possibilities on the PGO amount,

  • Accomplish great productivity as the entire system is built from scratch to offer added benefits. 
  • Collate start-up code with greater quality (totally different from the previous one). 
  • Size reduction of all files that are compiled. It compiles codes that are not used often, by utilizing low quality.

For over two decades PGO is utilized in .NET, hence the rebuild. Many have found the system to be tricky to work with. Microsoft team also doesn’t enjoy using it despite its splendid features and benefits.

There are a couple of reasons why I think one must enable PGO, that includes,

  • Simple integration – It has a simple integration that is utilized for PGO data within the construction flow and app. 
  • Tools – PGO has a tool to collect all the data that is present within the applications. It is now available in a testing and production environment.
  • Friendly Text – It is a format that is utilized for PGO data source control.
  • Processing tools – There are tools utilized to execute PGO data in numerous ways

πŸ’₯ Dynamic PGO 

The latest Dynamic PGO has features remarkably similar to the static PGO that I just spoke about. Static PGO will integrate with Crossgen 2, however, here dynamic PGO will integrate with Ryuji. 

Static PGO needs training and utilizing certain unique tools, whereas Dynamic PGO is hassle-free and automatic. You can utilize the running app to gather all the required data. I have also noticed the statistics of Static PGO gets stored; however, the statistics of Dynamic PGO gets lost as the execution of the application ends. 

Dynamic PGO has the following main utilities,

Interface and modify method call

Can now be interfaced and transformed into the non-virtual call. This creates an increase in the overall performance. 

Blend of dynamic PGO & Crossgen2  

With this you can learn all about compiling methods sparsely, it also depends on the way it is utilized. 

Crossgen2 communicates 

Through certain weighting, you can get to know the methods that are likely to gain from increased levels of collation at runtime. 

πŸ”₯ Crossgen2 

Earlier I mentioned a few things about Crossgen2 and how it’s a major leap in the initial build of this platform. Crossgen2 has a vital feature with a goal to be the standalone compiler. 

To get a better understanding of it let's look at Crossgen1 that was an individual runtime compilation. It had all the important components essential to generate the code. The approach that they had taken then generated plenty of issues. 

Currently, R2R code can be generated by Crossgen for every procedure in an assembly, which includes runtime and SDK. I felt it to be a complete waste because many were simply better off when kept at runtime.

.NET Core back in the days was utilized for deducting 10MB from Linux runtime allocation. Microsoft identifies over 10 MB in .NET 6. 

✨ CET – Control-flow Enforcement Technology 

The security feature is accessible on many new processors like AMD and Intel. It also adds many hardware features which protect against many common kinds of hijack attacks concerning flow control. 

The processor and OS will now track the control flow calls, all thanks to CET shadow stacks. Within shadow stack, it reverts in a thread, apart from to data stack. This helps to identify unintended changes within the control flow. It is shielded from accessing the memory with an application code keeping it away from attacks involving ROP. 

πŸ… HTTP/ 3 

It is HTTP's latest version that brings plenty of latest performance features in comparison to all the other previous versions. You can have access to it by simply utilizing the latest protocol QUIC. 

It utilizes UDP and has TLS integrated, allowing the establishment of connections way faster. It doesn’t rely on IP address connections, as opposed to QUIC and TPC, allowing mobile customers to switch between the Wireless network and mobile internet while keeping similar logical connections. Thus, allowing them to carry on with lengthy downloads. 

.NET 6 does not have support to HTTP/ 3 especially for macOS, this is only because it lacks TLS API which is very compatible which QUIC. 

Final Thoughts 

I agree the recent features and information are plenty of .NET 6 and they excite us, however most features aren’t completely exploited. Therefore, we must be patient for Microsoft to give an in-depth analysis. I expect this to happen very soon. 

I would like to leave you guys with something that Microsoft recently shared. Microsoft believes that the latest features found within .NET 6 are extremely inspiring and will be the foundation to all the things that come next. All these are some major bet features that will definitely give the platform a nudge in the right direction.

As we have reached the end of the article and you are still here, it only goes to say that you belong to a category of people that read all articles till the very last word, so I would like to know how many cups of coffee β˜• do you require every day to keep you programming? I hope to see plenty of coffees, it won't make me feel alone πŸ˜‰πŸ™ˆ.

If you enjoyed this article, please leave your comments, and follow me, so you're always the first one to read what's new!