Information about performance improvements in forthcoming .NET 5
Posted: (EET/GMT+2)
The next .NET release is planned this fall, and first preview version are already available, just recently preview 7. In addition to the previews, Microsoft is releasing preliminary information about performance, which is always an interesting topic.
The full post is here: Performance Improvements in .NET 5.
A few practical takeaways from that article:
- General runtime performance keeps improving steadily. In several microbenchmarks, .NET 5 is noticeably faster than .NET Core 3.1, often by double-digit percentages.
- The JIT compiler continues to remove more bounds checks automatically. Even small pattern changes (like iterating to
Length - 1) are now optimized, reducing overhead in tight loops. - Code generation is getting smaller as well as faster. In one example, generated assembly size dropped by ~20% alongside a measurable speedup.
- Regular expressions saw significant work. In many cases, throughput improvements are reported in the 3–6× range, depending on the pattern.
- Improvements are spread across many areas: GC, JIT, libraries, networking and text processing all contribute incremental gains rather than one single change.
The theme is clear: small optimizations in many places add up. You don’t need to change your application code to get the benefits. Kist upgrading the runtime alone can improve throughput and reduce allocations.
If you are interested and have the time, the original post contains the detailed benchmarks and examples. It’s a long post, but there are plenty of practical cases you’ll recognize from real code.
Faster C# applications are on their way!