.NET 11's headline runtime feature, Runtime Async, moves async suspension from compiler-generated state-machine classes into the runtime itself. A developer's measurements on SDK 11.0.100 show stack traces shrinking from 17 frames to 5 and up to a 3.2x speedup on awaits of already-completed tasks.
Key points
- Runtime Async is preview and opt-in via a single `<Features>runtime-async=on</Features>` line in the project file.
- A trace from three nested async methods fell from 17 frames to 5 as `MoveNext` and `AsyncTaskMethodBuilder.Start` frames disappeared.
- The CHAIN loop awaiting `Task.CompletedTask` went from 9.78 to 22.84 Mops/s; the `ValueTask<long>` LEAF loop from 9.41 to 29.89 Mops/s.
- The speedup is the best case for completed tasks; awaits with real I/O will gain less.
- `Math.BigMul(long, long, out long)` now compiles to a single `imul` on x64 with no helper call, 11 bytes of code.
- The quiet breaking change: the x86-64-v2 baseline means .NET 11 refuses to run on CPUs older than roughly 2013.
This summary was generated by the agent from the original post on DEV Community: #dotnet. The full text and all rights belong to its author and publisher. Go to original