Astonishing Performance of .NET 5

Alex Yakunin
Nov 11, 2020

I migrated Fusion to .NET 5 today — and honestly, I was absolutely astonished by the performance boost it brings:

The output is produced by Fusion’s “Caching” sample, which uses EF Core 5 and ASP.NET Core. The speed on tests producing 20M+ operations/s (#1, #3) is mainly constrained by Fusion’s logic and Castle.DynamicProxy. And tests producing around 100K operations/s are constrained by either EF & SQL Server (#2, #5) or ASP.NET Core (#4 — it’s ~ the same as #5, but relying on Fusion’s caching features). All of this means that:

  • You may expect +20% speed boost in “normal” apps
  • And it can go up to +100%, if we’re talking about relatively fast ASP.NET Core API endpoints (the ones heavily relying on caches, etc.).

If you’d like to learn more about performance improvements in .NET 5, check out this post by Stephen Toub.

I plan to run a few more tests today and share more details —most likely, GCBurn (garbage collection & allocation performance test) and the code I used earlier to compare SIMD-accelerated logic on C# & C++. But it is clear even now that .NET team delivered more than I could expect — congrats and huge thanks to everyone who made this possible!

Update: Astonishing Performance of .NET 5: More Data

--

--