Benchmark custom code workarounds against each new version of .NET as the framework gets faster all the time

Always revisit and benchmark your custom code workarounds with each version of .NET. The .NET framework and the JIT compiler gets faster … Continue reading Benchmark custom code workarounds against each new version of .NET as the framework gets faster all the time

Regular Expressions using RegexOptions.IgnoreCase slower than inline case insensitive pattern syntax in .NET 6

RegexOptions.IgnoreCase often offers better readability and expression of intent than inline pattern matching. We can see examples of the two … Continue reading Regular Expressions using RegexOptions.IgnoreCase slower than inline case insensitive pattern syntax in .NET 6

Amazing performance improvement in .NET 6 when creating one SortedDictionary from another

The performance improvements when cloning one SortedDictionary from another in .NET 6 compared to .NET 5 are amazing. I’m not … Continue reading Amazing performance improvement in .NET 6 when creating one SortedDictionary from another

Using declarations in C#8+ can allow us to dispose of resources correctly without increasing nesting levels

Since C#8 we can use single lineĀ using declarations which will allow us to dispose of resources at the end of … Continue reading Using declarations in C#8+ can allow us to dispose of resources correctly without increasing nesting levels