#590 – January 11, 2026
iterate through interfaces and limit virtual calls and allocations
.NET 10 de-abstracts not only arrays but other collections as well
less than a minute by NoPainNoGrain
.NET 10 improves performance by removing abstraction overhead when iterating through arrays. This optimization also works for other collections like lists and dictionaries. When you iterate through these collections using interfaces, the system eliminates virtual calls and allocations, making the code run as fast as direct access.
Enterprise patterns for ASP.NET Core minimal API: Data mapper pattern
10 minutes by Chris Woodruff
This post walks through a clean C# implementation of the Data Mapper, shows a before-and-after Minimal API, and makes a clear case for when the pattern earns its complexity and when it does not.
Task.delay fails if you wait longer than 49.7 days
2 minutes by Steven Giesel
Task.Delay crashes if you try to wait more than 49.7 days because it uses an unsigned integer for milliseconds internally. The maximum value is about 4.3 billion milliseconds, which equals roughly 49.7 days. For longer delays, he suggests to split them into smaller chunks and wait multiple times in a loop.
Unity's Mono problem: Why your C# code runs slower
12 minutes by Marek Fiser
Unity's C# code runs much slower than it should because it uses an outdated Mono runtime instead of modern .NET. Marek found his game runs 2-3 times faster on .NET compared to Unity's Mono, with some benchmarks showing up to 15 times faster performance. Modern .NET has better optimizations and a more efficient compiler that Unity users can't access. Unity announced they're working on upgrading to modern .NET but it won't be ready until after 2026.
Pass the state
10 minutes by Szymon Kulec
Szymon explains how lambda functions in C# can cause performance issues through "scope capturing." When lambdas reference external variables, C# creates hidden objects to store those variables, leading to extra memory allocations. Szymon shows how to use C# 9.0's static lambdas and state-passing overloads to avoid these allocations.
And the most popular article from the last issue was: