BenchmarkDotNet v0.13.2 was released recently and one of the new features is the ability to remove columns from the results … Continue reading Remove columns in BenchmarkDotNet result table
Category: .NET Core Blog
Faster HTTP/2 uploads in .NET 7
.NET 7 will have significantly faster HTTP/2 uploads 💪 … Quote from the Microsoft blog -> 👇 “We’ve increased Kestrel’s default … Continue reading Faster HTTP/2 uploads in .NET 7
HtmlDecode performance improvements in .NET 7
.NET 7 has significantly improved the performance of WebUtility.HtmlDecode 💪🏻 … The previous implementation had been manually iterating through each … Continue reading HtmlDecode performance improvements in .NET 7
.NET 7 LINQ performance improvements
There’s be some amazing performance improvements in certain LINQ methods in .NET 7 compared to .NET 6. Look at the … Continue reading .NET 7 LINQ performance improvements
Poll Results : What’s the most used version of .NET?
I was curious to see what version of .NET people were using for their apps so ran a poll on … Continue reading Poll Results : What’s the most used version of .NET?
How to set time unit in BenchmarkDotNet results
Explicitly setting the time measurement unit which BenchmarkDotNet should display results in is easy… 👇🏻
How to have multiple baselines in BenchmarkDotNet
Without doing anything else if we try to mark two or more benchmark methods as baselines BenchmarkDotNet will complain… .. … Continue reading How to have multiple baselines in BenchmarkDotNet
Group benchmarks by method when using Params in BenchmarkDotNet
Using the Params attribute in BenchmarkDotNet is really useful as it allows us to get benchmark results for each combination … Continue reading Group benchmarks by method when using Params in BenchmarkDotNet
How to have a GlobalSetup per benchmark in BenchmarkDotNet
If we are using BenchmarkDotNet and want to have a different setup method for each benchmark or groups of benchmarks … Continue reading How to have a GlobalSetup per benchmark in BenchmarkDotNet
.NET 6 v .NET 7 reflection performance benchmarks
.NET 7 (Preview 5+) has some awesome performance improvements when it comes to reflection functionality like invoking methods BUT there … Continue reading .NET 6 v .NET 7 reflection performance benchmarks
How to benchmark different versions of the same library with BenchmarkDotNet
If you want to benchmark the performance of two or more versions of the same library against each other you … Continue reading How to benchmark different versions of the same library with BenchmarkDotNet
Running BenchmarkDotNet benchmarks against .NET 7
.NET 7 will be released in November 2022. If you want to run performance benchmarks against it using BenchmarkDotNet you … Continue reading Running BenchmarkDotNet benchmarks against .NET 7
How to turn off and disable Global Usings in Visual Studio
Not everyone is a fan of Global Usings which were released with C# 10 in November 2021. Since the templates … Continue reading How to turn off and disable Global Usings in Visual Studio
How to run benchmarks against multiple versions of .NET with BenchmarkDotNet
If you’re into this sort of stuff like me it can be fun to run benchmarks against bits of code … Continue reading How to run benchmarks against multiple versions of .NET with BenchmarkDotNet
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
Three examples of Regular Expression performance improvements in .NET 7
Stephens Toubs performance articles on devblogs.microsoft.com are always something I look forward to. In May 2022 he wrote one covering … Continue reading Three examples of Regular Expression performance improvements in .NET 7
Microseconds and Nanoseconds available in .NET 7
Currently developers have to perform calculations on the Ticks property to calculate microseconds and nanoseconds. .NET 7 will address this … Continue reading Microseconds and Nanoseconds available in .NET 7
.NET 6 can capture W3C format server logs for our web apps
.NET 6 added the ability for us to capture server access logs in W3C extended log file format (IIS default) … Continue reading .NET 6 can capture W3C format server logs for our web apps
Use C# 10 Global Usings to make namespaces available to all files in a project
Global Usings in C# 10 allow us to declare a namespace as being available to all files in a project … Continue reading Use C# 10 Global Usings to make namespaces available to all files in a project
Use file-level namespaces in C# 10 to reduce vertical nesting
In C# 9 we saw how top-level statements can help us reduce ‘wasted’ vertical space… BUT… reducing ‘wasted’ horizontal space … Continue reading Use file-level namespaces in C# 10 to reduce vertical nesting
.NET 6 has new MaxBy extension method for finding max value of a property in a collection
MaxBy is a nice LINQ extension which was released as part of .NET 6 in November 2021. It allows us … Continue reading .NET 6 has new MaxBy extension method for finding max value of a property in a collection
String.Join performance has improved in .NET 6
In C#, String.Join is very useful to get a delimiter separated string from a string list. This is another method … Continue reading String.Join performance has improved in .NET 6
String.Replace performance improvements in .NET 6
The below String.Replace benchmarks show some solid performance improvements between .NET 5 v .NET 6… I’ve included other runtimes too … Continue reading String.Replace performance improvements in .NET 6
In .NET 6 we can set default return values for FirstOrDefault(), LastOrDefault() and SingleOrDefault()
.NET 6 has a few LINQ improvements. One of them is support for custom default return values for FirstOrDefault(), LastOrDefault() … Continue reading In .NET 6 we can set default return values for FirstOrDefault(), LastOrDefault() and SingleOrDefault()
DateTime.UtcNow and DateTime.Now performance improvements in .NET 6
DateTime.UtcNow is significantly faster in .NET 6 compared to .NET 5. The performance improvement mainly comes from negating the regressions … Continue reading DateTime.UtcNow and DateTime.Now performance improvements in .NET 6