Sitemap

.NET Performance #1: Performance Improvements in .NET 7

These methods have become faster in .NET 7

7 min readOct 17, 2022

--

Press enter or click to view image in full size
Photo by CHUTTERSNAP on Unsplash

Welcome to the first episode of the .NET Performance Series. This series features researches, benchmarks and comparisms of many different topics in the .NET world. The focus lies — as the title announces — on performance using the latest .NET 7. You are going to see which method is the fastest to implement specific topics as well as plenty of tips and tricks, how you can maximize your code performance with low effort. If you are interested in these topics, stay tuned!

.NET 7 is currently (17.10.2022) in Preview and will be released in November 2022. With this new release, Microsoft provides some big performance improvements. This first article of the .NET Performance Series is about the most noteable performance improvements from .NET 6 to .NET 7.

LINQ

The most relevant improvement is definetly in LINQ. With .NET 7 the dotnet community leveraged the handling of numeric arrays in LINQ to using Vector<T>. This significantly improves some LINQ methods, that you can call on List<int> or int[], as well as other numeric collections. The LINQ methods are now also able to directly access the underlying array, instead of enumerating it. Let’s have a look on how these methods behave relatively to .NET 6.

--

--

Tobias Streng
Tobias Streng

Written by Tobias Streng

Senior Software and Cloud Solutions Architect

Responses (1)