Benchmarks indicate big performance improvements in .NET 6

The upcoming next major version of Microsoft .NET, .NET 6, improves performance of many operations significantly according to Microsoft's benchmark tests.

A new post on the Dotnet developer blog by Stephen Toub,
Partner Software Engineer, .NET, offers insights on the benchmark tests and the performance improvements compared to previous versions of .NET.

net 6

According to the post, about 6500 merged pull requests landed in .NET 6, excluding automated pull requests by bots. Of these, about 550 improve performance in one area or another, according to Microsoft.

The post is technical in nature; it contains a lot of code, examples and instructions to run the benchmark to verify the results. BenchmarkDotNet was used for the majority of results.

As examples, here are the benchmark results of Just In Time benchmark tests. Most tests compare the performance of .NET 6.0 with .NET 5.0, but you find other .NET versions used in some of the tests as well.

MethodRuntimeMeanRatioCode Size
Format.NET 5.013.21 ns1.001,649 B
Format.NET 6.010.37 ns0.78590 B
MethodRuntimeMeanRatioCode Size
Find.NET Framework 4.8115.4 us1.00127 B
Find.NET Core 3.169.7 us0.6071 B
Find.NET 5.069.8 us0.6063 B
Find.NET 6.053.4 us0.4657 B
MethodRuntimeMeanRatioCode SizeAllocated
GetLength.NET Framework 4.86.3495 ns1.000106 B32 B
GetLength.NET Core 3.14.0185 ns0.62866 B
GetLength.NET 5.00.1223 ns0.01927 B
GetLength.NET 6.00.0204 ns0.00327 B
MethodMeanCode Size
PGO Disabled1.905 ns30 B
PGO Enabled0.7071 ns105 B
MethodRuntimeMeanRatioCode Size
Sum.NET 5.0471.3 us
 54 B
Sum.NET 6.0
350.0 us
97 B
MethodRuntimeMeanRatioCode Size
GetHeight.NET 5.0151.7852 ns1.000179 B
GetHeight.NET 6.00.0000 ns0.00012 B
MethodRuntimeMeanRatioCode Size
Format.NET 5.087.71 ns1.000154 B
GetHeight.NET 6.051.88 ns0.59100 B

You can check out the full blog post at the Dot Net Dev Blog for a full rundown of all tests, code examples, and explanations why performance improved for a particular benchmark test.

Developers interested in .NET may download the latest preview release, .NET 6.0 Preview 7 at the time of writing, from Microsoft's Developer website. It is available for Windows (ARM, x64, x32), Linux (Arm32, Arm64, x64) and Mac OS X (Arm64, x64). Only binaries provided for Linux, installers and binaries for Windows and Mac OS.

Now You: do you use applications that require .NET?

Article Name
Benchmarks indicate big performance improvements in .NET 6
The upcoming next major version of Microsoft .NET, .NET 6, improves performance of many operations significantly according to Microsoft's benchmark tests.
Ghacks Technology News

Previous Post: «


  1. John G. said on August 18, 2021 at 4:40 pm

    When will be W10 or W11 realeased with NET 6.0 inside? Any way to upgrade it from 4.8 to 6.0? :[

    1. beemeup5 said on August 19, 2021 at 7:48 am

      There is no path from 4.8 to 6.0.

      4.8 will be the last .NET Framework release. .NET 6 (formerly .NET Core) represents an entirely new development paradigm for Microsoft. The biggest takeaway with .NET 6 is that Microsoft has gone all-in on cross-platform development. Now any programs developed with .NET 6 can be easily compiled for Mac, Linux, even Android and iOS. .NET 5 laid a lot of the groundwork for this to happen but .NET 6 is when the new era officially begins. There is no better time to be a C# programmer than now.

    2. ULBoom said on August 19, 2021 at 3:21 pm

      It’ll be installed separately similar to all the Visual C++ versions you may have, depending on whether they’re needed, which can be seen in Programs and Features. If you click Turn Windows and Features on and off, the first entry is dotNet’s.

      Follow the link Martin provided and nightlys can be downloaded.

  2. DrKnow said on August 18, 2021 at 11:55 pm

    Real world scenarios no one will notice.

  3. TAFF said on September 7, 2021 at 10:05 am

    As always, awesome! Thanks for these .NET posts!

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.