Questions tagged [benchmarkdotnet]

BenchmarkDotNet is a powerful .NET library for measuring absolute and relative code performance.

BenchmarkDotNet is open source and available on GitHub under MIT license. It is distributed as a Nuget package.

BenchmarkDotNet executes measured method multiple times and accumulates statistics on time performance of the method, with ability to differentiate a first (warm up) execution time, which might involve JIT comilcation and sustained performance after the code is JIT'ed.

Example of report from BenchmarkDotNet, comparing performance of two alternative algorithms (in this case cryptographic hash sums) -- MD5 and SHA5:

BenchmarkDotNet=v0.9.0.0
OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz, ProcessorCount=8
Frequency=2728067 ticks, Resolution=366.5599 ns
HostCLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]


Type=Md5VsSha256  Mode=Throughput
 Method |      Median |    StdDev
------- |------------ |----------
    Md5 |  21.2912 us | 0.4373 us
 Sha256 | 107.4124 us | 1.8339 us
92 questions
0
votes
1 answer

LOH benchmarking using benchmarkdotnet

So I'm doing some benchmark to compare the deserialisation of a big JSON file from a String or a Stream using the BenchMarkDotNet library. I'd like to see the state of the LOH specifically but I can't find how to do it. Currently I'm having the…
Cholesterol
  • 177
  • 2
  • 10
0
votes
1 answer

How to benchmark logging infrastructure with BenchmarkDotNet?

We have a an internal framework that handles our logging , data access, crypto..you name it. I'd like to start comparing the performance, of say the logging functionality to other mainstream systems i.e. nlog, log4net, serilog. Obviously I'd start…
Stephen Patten
  • 6,333
  • 10
  • 50
  • 84
1 2 3 4 5 6
7