File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed
src/Merq.Benchmarks/BenchmarkDotNet.Artifacts/results Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -411,6 +411,35 @@ builder.Services.AddServices();
411411
412412< ! -- #duck -- >
413413
414+ < ! -- #perf -- >
415+ # Performance
416+
417+ The performance of Merq is on par with the best implementations of the
418+ the same pattern , for example [MediatR ](https :// www.nuget.org/packages/mediatr).
419+ Note it sacrifices (minimally ) performance for fewer allocations , most
420+ notably for the synchronous command execution path :
421+
422+ < ! -- include ./ src / Merq .Benchmarks / BenchmarkDotNet .Artifacts / results / Merq .MerqVsMediatR .Benchmark - report - github .md -- >
423+ ```
424+
425+ BenchmarkDotNet v0 .13 . 12 , Windows 11 (10.0.22622.575 )
426+ Intel Core i9 - 10900T CPU 1.90GHz , 1 CPU , 20 logical and 10 physical cores
427+ .NET SDK 9.0.100 - preview .2.24074.1
428+ [Host ] : .NET 8.0.1 (8.0.123.58001 ), X64 RyuJIT AVX2
429+ DefaultJob : .NET 8.0.1 (8.0.123.58001 ), X64 RyuJIT AVX2
430+
431+
432+ ```
433+ | Method | Mean | Error | StdDev | Median | Gen0 | Allocated |
434+ | -------------- | -------- - : | -------- : | -------- - : | -------- - : | ------ - : | ---------- : |
435+ | PingMerq | 303 . 8 ns | 6 . 05 ns | 15 . 84 ns | 302 . 7 ns | 0 . 0172 | 184 B |
436+ | PingMerqAsync | 294 . 7 ns | 5 . 35 ns | 5 . 95 ns | 295 . 2 ns | 0 . 0248 | 264 B |
437+ | PingMediatR | 166 . 8 ns | 3 . 15 ns | 6 . 99 ns | 164 . 2 ns | 0 . 0319 | 336 B |
438+
439+ < ! -- ./ src / Merq .Benchmarks / BenchmarkDotNet .Artifacts / results / Merq .MerqVsMediatR .Benchmark - report - github .md -- >
440+
441+ < ! -- #perf -- >
442+
414443< ! -- #ci -- >
415444
416445# Dogfooding
Original file line number Diff line number Diff line change 1+ ```
2+
3+ BenchmarkDotNet v0.13.12, Windows 11 (10.0.22622.575)
4+ Intel Core i9-10900T CPU 1.90GHz, 1 CPU, 20 logical and 10 physical cores
5+ .NET SDK 9.0.100-preview.2.24074.1
6+ [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2
7+ DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2
8+
9+
10+ ```
11+ | Method | Mean | Error | StdDev | Median | Gen0 | Allocated |
12+ | -------------- | ---------:| --------:| ---------:| ---------:| -------:| ----------:|
13+ | PingMerq | 303.8 ns | 6.05 ns | 15.84 ns | 302.7 ns | 0.0172 | 184 B |
14+ | PingMerqAsync | 294.7 ns | 5.35 ns | 5.95 ns | 295.2 ns | 0.0248 | 264 B |
15+ | PingMediatR | 166.8 ns | 3.15 ns | 6.99 ns | 164.2 ns | 0.0319 | 336 B |
You can’t perform that action at this time.
0 commit comments