An inventory check returns from cache. Every caller still uses await , but the operation can finish on the spot. Runtime Async was the biggest .NET 11 announcement for me because it gives the runtime a way to optimize that whole chain while keeping the C# code the same. Rich Lander and Andy Gocke showed what that meant for allocations and for the call stack you read when debugging.
.NET 11 shipped on November 10. Runtime Async is where I’d start experimenting, followed by faster builds, C# 15 unions, and Blazor’s inventory-validation demo. Microsoft’s .NET 11 announcement
Note: all the videos in this article are already linked at the time of the announcement
Runtime Async makes a cache hit cheaper
Traditionally, Roslyn lowers each async method into a state machine. With Runtime Async, the runtime handles suspension and resumption, which gives the JIT more scope to optimize across method boundaries.…