The new ASP.NET Core and EF Core are also ready.
You can download .NET 5.0 Preview 7 for Windows, macOS and Linux:
You need to use Visual Studio 2019 16.7 to work with .NET 5.0. .NET 5.0 is now supported by Visual Studio for Mac . Install the latest C # extension to use .NET 5.0 with Visual Studio Code .
Read more about Preview 7 under the cut.
Performance
Stephen Taub recently published his post "Performance Improvements in .NET 5", the latest in a series. It covers ~ 250 performance-oriented pull requests, which contain improvements that might even surprise people closely watching .NET Core performance.
System.Text.Json
We've added a usability feature to the new JSON API. The following features are new in Preview 7 (there will be more in Preview 8).
(GC)
The GC now provides details of the most recent collection through the GC.GetGCMemoryInfo method , which returns a GCMemoryInfo structure . GCMemoryInfo provides information about machine memory, heap memory, and the most recent collection, or the most recent collection of the type of GC you specify - ephemeral, full blocking, or background GC.
The most likely use cases for this new API are for logging / monitoring, or to tell the bootloader to load balancer that a machine should be taken out of rotation to request a full GC. This can also be used to avoid hard container constraints by reducing the size of caches.
RyuJIT
RyuJIT is an assembly code generator for .NET designed for both Intel and ARM chips. Much of RyuJIT's work is focused on performance.
- Major improvements
- Enable eliding some bounds checks - Credit @ nathan-moore
- Optimize Enum.CompareTo after being rewritten in C # - performance is now at parity with previous C ++ implementation.
- Improvement in register allocation for structs - Enregister multireg lclVars
- Improvements for removal of redundant zero inits
- Tail duplication improvement
- Stack based structs copy CQ fix
- Clean up a dead field assignment after removing redundant zero initializations
- ARM64 hardware intrinsic and API optimization
- Implement majority of "by element" intrinsics
- Implement fcvtxn, fcvtxn2, sqabs, sqneg, suqadd, usqadd intrinsics - # 38010 , # 38110
- Optimize SpanHelpers.IndexOf (byte), SpanHelpers.IndexOf (char)
- Optimize SpanHelpers.IndexOfAny (byte)
- Optimize WithLower, WithUpper, Create, AsInt64, AsUInt64, AsDouble
- Optimize AsVector, AsVector128, GetUpper, As and WithElement
Conclusion
Please tell us about your experience with Preview 7. It's not too late to share your feedback. We are getting closer to the release, and now we are paying more attention to quality, as we have basically finished developing new features.