How slow your code is?

Race

Grigoriy Belenkiy
Software engineer at 361 Capital
@grishace

Denver Dev Day
November 22, 2019

TIMTOWTDI

Perl motto

Knuth quote

Micro-Benchmarking

  • DateTime.Now — naïve
  • System.Diagnostics.Stopwatch — better
  • BenchmarkDotNet

BenchmarkDotNet

BenchmarkDotNet logo

BenchmarkDotNet

  • .NET Framework (4.6+), .NET Core (2.0+), Mono, CoreRT
  • C#, F#, Visual Basic
  • Windows, Linux, macOS

BenchmarkDotNet

  • Standard benchmarking routine
  • Execution control
  • Statistics
  • Relative performance
  • Memory diagnostics
  • Parametrization
  • Powerful reporting system

Demo

Book

Pro .NET Benchmarking: The Art of Performance Measurement
Pro .NET Benchmarking: The Art of Performance Measurement

Questions?

https://github.com/grishace/ddd-bench
https://github.com/grishace/ddd-bench

https://benchmarkdotnet.org/