Microsoft .NET Team 发布了 .NET 11 运行时的多项新功能与更新,其中最核心的变化是引入了 Runtime Async V2 1。该特性通过运行时直接管理异步操作的挂起和恢复,取代了此前由编译器生成的状态机类,从而改善了调试体验并提升了性能 1。开发者若要在项目中使用这一新机制,需在项目文件中显式设置 runtime-async=on 1。
在底层架构优化方面,.NET 11 对即时编译(JIT)进行了多项改进,包括边界检查消除、针对 SequenceEqual 的常量折叠以及去虚拟化增强 1。NativeAOT 的接口分派速度得到提升,且在 iOS 和 tvOS 平台上默认禁用了建议文件锁定 1。此外,集合操作性能因 Comparer.Default 在 ReadyToRun (R2R) 中的特化而最高提升 20 倍,Linux 上 Guid.NewGuid() 的吞吐量也增加了约 12% 1。
此次更新还调整了最低硬件要求以简化代码维护并提高效率 1。x86/x64 平台的基线从 x86-64-v1 提升至 v2,Arm64 Windows 平台则要求支持 LSE 指令集 1。ReadyToRun 目标也随之更新,Windows/Linux x86 使用 x86-64-v3,Arm64 Linux 加入了对 LSE 的支持 1。同时,新版本还支持超过 1024 个逻辑处理器的初始化 1。
The Microsoft .NET Team has released significant updates to the .NET 11 runtime, headlined by the introduction of Runtime Async V2. 1 This new feature shifts the management of asynchronous suspensions and resumptions from compiler-generated state machine classes to the runtime itself, aiming to enhance both debugging experiences and performance. 1 To activate this capability, developers must explicitly set runtime-async=on in their project files. 1
In parallel with these functional changes, the update imposes stricter minimum hardware requirements to simplify code maintenance and boost execution efficiency. 1 The baseline for x86 and x64 architectures has been raised from x86-64-v1 to x86-64-v2, while Arm64 Windows now requires the Large System Extensions (LSE) instruction set. 1 These constraints extend to ReadyToRun (R2R) targets, where Windows and Linux x86 builds utilize x86-64-v3, and Arm64 Linux implementations have added LSE support. 1
Further performance optimizations have been applied across various components, including JIT compilation improvements such as bounds check elimination, constant folding for SequenceEqual, and enhanced devirtualization. 1 Specific gains include a roughly 12% throughput increase for Guid.NewGuid() on Linux and up to 20x faster collection operations due to specialized Comparer.Default handling in R2R. 1 Additionally, NativeAOT interface dispatch speeds have improved, initialization now supports more than 1,024 logical processors, and advisory file locking is disabled by default on iOS and tvOS platforms. 1
评论
还没有评论,欢迎留下第一条。