2 min

Tags in this article

, , , ,

The new version is predicted to include around 1000 performance enhancements.

Microsoft software engineer Stephen Toub announced that the forthcoming release of .NET 7 will offer an impressive array of performance enhancements. “As with previous versions of .NET, performance is a key focus that pervades the entire stack”, Toub writes in a major blog post.

“When I sat down to write this a few weeks ago, I was faced with a list of almost 1000 performance-impacting PRs (out of more than 7000 PRs that went into the release)”, he continues. “I’m excited to share almost 500 of them here with you.”

What follows is a massive article of 75,000 words, detailing those 500 performance-enhancing PRs. Toub concludes that “it’s the fastest .NET ever”. The .NET Runtime supports Windows, Linux and macOS. Toub states that his results are recorded on Windows 11 64-bit but “aren’t Windows-specific”.

Fast, but just how fast?

A big speed-up in some corner of the .NET just-in-time (JIT) compiler, for example, might make little difference to most applications but a big difference for code that happens to stress that part of its functionality.

One of the things Toub discusses is bounds-check elimination. The compiler can maintain memory safety but improve performance by skipping checks for accessing out-of-bounds memory. A performance test showed a four-times speed-up in some array operations.

According to website DevClass, the performance of real-world applications depends more on the skill of developers than algorithm benchmarks. Still, they say, getting more speed simply by upgrading the runtime is always an attractive prospect. .NET 7 is not a long-term support release, so many will wait for next year’s .NET 8 to put these changes into production.

Tip: New Visual Studio extension makes C# code easier to read