Room 1 

09:00 - 10:00 


Talk (60 min)

Beyond simple benchmarks—A practical guide to optimizing code

We know it’s vital that code executed at scale performs well. But how do we know if our performance optimizations actually make it faster? Fortunately, we have powerful tools which help—BenchmarkDotNet is a .NET library for benchmarking optimizations, with many simple examples to help get started.


In most systems, the code we need to optimize is rarely straightforward. It contains assumptions we need to discover before we even know what to improve. The code is hard to isolate. It has dependencies, which may or may not be relevant to optimization. And even when we’ve decided what to optimize, it’s hard to reliably benchmark the before and after. Only measurements can tell us if our changes actually make things faster. Without them, we could even make things slower, without realizing.

Understanding how to create benchmarks is the tip of the iceberg. In this talk, you'll also learn how to:
* Identify areas of improvement which optimize the effort-to-value ratio
* Isolate code to make its performance measurable without extensive refactoring
* Apply the performance loop of measuring, changing and validating to ensure performance actually improves and nothing breaks
* Gradually become more “performance aware” without costing an arm and a leg

Daniel Marbach

As a distinguished Microsoft MVP and software maestro at Particular Software, Daniel Marbach knows a thing or two about code. By day, he's a devoted .NET crusader, espousing the virtues of message-based systems. By night? He's racing against his own mischievous router hack, committing a bevy of performance improvements before the clock strikes midnight.