Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 1.22 KB

File metadata and controls

25 lines (21 loc) · 1.22 KB

.NET Core vs Framework: Common Collections Performance

This repo contains benchmarks to compare performance of common dotnet collections in .NET Core and .NET Framework.
This is addendum to my blog post: .NET Core vs Framework: Collections Performance (RU)
It uses BenchmarkDotNet for benchmarking and contains results from my PC as well.

Run steps

  • Install .NET Core 3.1, .NET Core 2.1, .NET Framework 4.8 (download)
  • Change build mode to Release
  • Open Program.cs and make adjustsments if needed (see below)
  • Run project

BenchmarkDotNet Options

There is a couple of options you may want to change in Program.cs.

var bdnArgs = new string[] { "--filter=RuntimePerformance.Collections*" };

Here you can pass any arguments to BenchmarkDotNet, for example - filter for benchmarks.
Set it to RuntimePerformance.Collections.List* if you want to run only List tests.
Full run can take 1 hour approx, so this can be useful.

return DefaultConfig.Instance.With(jobs).WithArtifactsPath(@"..\..\..\..\..\");

Here you can set ArtifactsPath - the results folder path.