Archive for the BenchmarkDotNet category

Vaughan

When to consider using ValueTask over Task with async code

.NET Core, BenchmarkDotNet, Benchmarking, Measuring, Performance

As of .NET Core 2.0, you can use ValueTask and ValueTask as return types for your async methods. Its important to understand when and if you should use these instead of a Task and what the trade-offs are if you decide to use it. I would say that if you aren’t measuring the performance of […]

Read more
Vaughan

Counting sheep with BenchmarkDotNet

.NET Core, BenchmarkDotNet, Benchmarking, Measuring, Performance

When trying to improve the performance of your code, the first thing you need to do is measure. If you don’t measure then you won’t know if your changes are actually improving performance. In most cases, there is a trade-off between readability and performance. Often better performing code is more complex and harder to maintain. […]

Read more

BMC logoBuy me a coffee