.NET 11 vs Go 1.27: Runtime Async, 14 Workloads, and an ASP.NET Core Shootout

Introduction Last time I compared Go 1.26 and .NET 10 strictly on memory allocation, and the conclusion was that the winner depended entirely on the workload: Go for strings and concurrency, .NET for collections and hash sets. This is the follow-up, with three changes that make it a much more interesting fight: .NET 11 (SDK 11.0.100, runtime 11.0.0) — including its new Runtime Async implementation, which I explicitly enabled. Go 1.27.4 — the latest release, built with GOAMD64=v3 to match .NET’s x86-64-v3 ReadyToRun baseline. A wider benchmark surface — 14 workloads instead of 6, plus an actual ASP.NET Core vs net/http requests-per-second comparison. Both sides are Release builds on the same machine, and every number below comes from the same harness, the same data structures and the same algorithms. ...

November 15, 2026 · 22 min · Rishi Daftary

C#13 params collection performance benchmark

Microsoft released the latest version of C# i.e. C#13 and now it allows params to be any of the collections supported by collection expressions rather than just arrays. So, I quickly wrote the benchmark code to test the performance and overall, it did improve the performance. Here’s the code snippet and results for the single value test: public class ParamsBenchmark{ // Dummy methods to illustrate the params collections public int SumOld(params int[] numbers) { var sum = 0; foreach (var num in numbers) { sum += num; } return sum; } public int SumNew(params Span<int> numbers) { int sum = 0; foreach (var num in numbers) { sum += num; } return sum; } [Benchmark] public int SumOldParams() { return SumOld(1, 2, 3, 4, 5); } [Benchmark] public int SumNewParams() { return SumNew([1, 2, 3, 4, 5]); } } Below are my benchmark results: ...

November 20, 2023 · 1 min · Rishi Daftary