@@ -4,7 +4,7 @@ Foundatio.Mediator aims to get as close to direct method call performance as pos
44
55## Benchmark Results
66
7- > 📊 ** Last Updated:** 2025-12-23
7+ > 📊 ** Last Updated:** 2026-01-06
88
99### Commands
1010
@@ -14,12 +14,12 @@ Fire-and-forget dispatch with no return value.
1414<thead >
1515<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
1616</thead >
17- <tbody ><tr ><td style =" width :100% " ><code >Direct_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >3.036 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
18- <tr ><td style =" width :100% " ><code >Foundatio_Command </code ></td ><td style =" text-align :right ;white-space :nowrap " >5.127 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
19- <tr ><td style =" width :100% " ><code >MediatorNet_Command </code ></td ><td style =" text-align :right ;white-space :nowrap " >11.742 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
20- <tr ><td style =" width :100% " ><code >MediatR_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >54.904 ns</td ><td style =" text-align :right ;white-space :nowrap " >128 B</td ></tr >
21- <tr ><td style =" width :100% " ><code >Wolverine_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >240.127 ns</td ><td style =" text-align :right ;white-space :nowrap " >704 B</td ></tr >
22- <tr ><td style =" width :100% " ><code >MassTransit_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >1,736.321 ns</td ><td style =" text-align :right ;white-space :nowrap " >4,192 B</td ></tr >
17+ <tbody ><tr ><td style =" width :100% " ><code >Direct_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >2.818 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
18+ <tr ><td style =" width :100% " ><code >MediatorNet_Command </code ></td ><td style =" text-align :right ;white-space :nowrap " >9.130 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
19+ <tr ><td style =" width :100% " ><code >Foundatio_Command </code ></td ><td style =" text-align :right ;white-space :nowrap " >15.698 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
20+ <tr ><td style =" width :100% " ><code >MediatR_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >36.446 ns</td ><td style =" text-align :right ;white-space :nowrap " >128 B</td ></tr >
21+ <tr ><td style =" width :100% " ><code >Wolverine_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >172.840 ns</td ><td style =" text-align :right ;white-space :nowrap " >704 B</td ></tr >
22+ <tr ><td style =" width :100% " ><code >MassTransit_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >1,261.958 ns</td ><td style =" text-align :right ;white-space :nowrap " >4,192 B</td ></tr >
2323</tbody >
2424</table >
2525
@@ -31,12 +31,12 @@ Request/response dispatch returning an Order object.
3131<thead >
3232<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
3333</thead >
34- <tbody ><tr ><td style =" width :100% " ><code >Direct_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >31.557 ns</td ><td style =" text-align :right ;white-space :nowrap " >120 B</td ></tr >
35- <tr ><td style =" width :100% " ><code >Foundatio_Query </code ></td ><td style =" text-align :right ;white-space :nowrap " >31.946 ns</td ><td style =" text-align :right ;white-space :nowrap " >120 B</td ></tr >
36- <tr ><td style =" width :100% " ><code >MediatorNet_Query </code ></td ><td style =" text-align :right ;white-space :nowrap " >40.284 ns</td ><td style =" text-align :right ;white-space :nowrap " >120 B</td ></tr >
37- <tr ><td style =" width :100% " ><code >MediatR_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >77.069 ns</td ><td style =" text-align :right ;white-space :nowrap " >320 B</td ></tr >
38- <tr ><td style =" width :100% " ><code >Wolverine_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >335.164 ns</td ><td style =" text-align :right ;white-space :nowrap " >1,000 B</td ></tr >
39- <tr ><td style =" width :100% " ><code >MassTransit_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >6,436.008 ns</td ><td style =" text-align :right ;white-space :nowrap " >12,497 B</td ></tr >
34+ <tbody ><tr ><td style =" width :100% " ><code >Direct_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >25.439 ns</td ><td style =" text-align :right ;white-space :nowrap " >120 B</td ></tr >
35+ <tr ><td style =" width :100% " ><code >MediatorNet_Query </code ></td ><td style =" text-align :right ;white-space :nowrap " >32.873 ns</td ><td style =" text-align :right ;white-space :nowrap " >120 B</td ></tr >
36+ <tr ><td style =" width :100% " ><code >Foundatio_Query </code ></td ><td style =" text-align :right ;white-space :nowrap " >40.079 ns</td ><td style =" text-align :right ;white-space :nowrap " >120 B</td ></tr >
37+ <tr ><td style =" width :100% " ><code >MediatR_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >56.719 ns</td ><td style =" text-align :right ;white-space :nowrap " >320 B</td ></tr >
38+ <tr ><td style =" width :100% " ><code >Wolverine_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >243.265 ns</td ><td style =" text-align :right ;white-space :nowrap " >1,000 B</td ></tr >
39+ <tr ><td style =" width :100% " ><code >MassTransit_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >4,711.686 ns</td ><td style =" text-align :right ;white-space :nowrap " >12,496 B</td ></tr >
4040</tbody >
4141</table >
4242
@@ -48,12 +48,12 @@ Notification dispatched to 2 handlers.
4848<thead >
4949<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
5050</thead >
51- <tbody ><tr ><td style =" width :100% " ><code >Direct_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >4.265 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
52- <tr ><td style =" width :100% " ><code >MediatorNet_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >14.959 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
53- <tr ><td style =" width :100% " ><code >Foundatio_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >21.383 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
54- <tr ><td style =" width :100% " ><code >MediatR_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >129.381 ns</td ><td style =" text-align :right ;white-space :nowrap " >792 B</td ></tr >
55- <tr ><td style =" width :100% " ><code >Wolverine_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >2,371.862 ns</td ><td style =" text-align :right ;white-space :nowrap " >2,840 B</td ></tr >
56- <tr ><td style =" width :100% " ><code >MassTransit_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >2,701.091 ns</td ><td style =" text-align :right ;white-space :nowrap " >6,016 B</td ></tr >
51+ <tbody ><tr ><td style =" width :100% " ><code >Direct_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >2.890 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
52+ <tr ><td style =" width :100% " ><code >MediatorNet_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >10.210 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
53+ <tr ><td style =" width :100% " ><code >Foundatio_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >32.287 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
54+ <tr ><td style =" width :100% " ><code >MediatR_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >88.472 ns</td ><td style =" text-align :right ;white-space :nowrap " >792 B</td ></tr >
55+ <tr ><td style =" width :100% " ><code >Wolverine_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >1,716.843 ns</td ><td style =" text-align :right ;white-space :nowrap " >2,840 B</td ></tr >
56+ <tr ><td style =" width :100% " ><code >MassTransit_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >1,925.750 ns</td ><td style =" text-align :right ;white-space :nowrap " >6,016 B</td ></tr >
5757</tbody >
5858</table >
5959
@@ -65,12 +65,12 @@ Query where handler has an injected service (IOrderService) and timing middlewar
6565<thead >
6666<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
6767</thead >
68- <tbody ><tr ><td style =" width :100% " ><code >MediatorNet_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >55.357 ns</td ><td style =" text-align :right ;white-space :nowrap " >192 B</td ></tr >
69- <tr ><td style =" width :100% " ><code >Direct_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >85.645 ns</td ><td style =" text-align :right ;white-space :nowrap " >304 B</td ></tr >
70- <tr ><td style =" width :100% " ><code >MediatR_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >179.436 ns</td ><td style =" text-align :right ;white-space :nowrap " >744 B</td ></tr >
71- <tr ><td style =" width :100% " ><code >Foundatio_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >252.710 ns</td ><td style =" text-align :right ;white-space :nowrap " >776 B</td ></tr >
72- <tr ><td style =" width :100% " ><code >Wolverine_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >377.998 ns</td ><td style =" text-align :right ;white-space :nowrap " >1,000 B</td ></tr >
73- <tr ><td style =" width :100% " ><code >MassTransit_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >6,304.521 ns</td ><td style =" text-align :right ;white-space :nowrap " >12,569 B</td ></tr >
68+ <tbody ><tr ><td style =" width :100% " ><code >MediatorNet_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >40.075 ns</td ><td style =" text-align :right ;white-space :nowrap " >192 B</td ></tr >
69+ <tr ><td style =" width :100% " ><code >Direct_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >66.235 ns</td ><td style =" text-align :right ;white-space :nowrap " >304 B</td ></tr >
70+ <tr ><td style =" width :100% " ><code >MediatR_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >134.765 ns</td ><td style =" text-align :right ;white-space :nowrap " >744 B</td ></tr >
71+ <tr ><td style =" width :100% " ><code >Foundatio_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >183.770 ns</td ><td style =" text-align :right ;white-space :nowrap " >752 B</td ></tr >
72+ <tr ><td style =" width :100% " ><code >Wolverine_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >258.525 ns</td ><td style =" text-align :right ;white-space :nowrap " >1,000 B</td ></tr >
73+ <tr ><td style =" width :100% " ><code >MassTransit_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >5,635.649 ns</td ><td style =" text-align :right ;white-space :nowrap " >12,568 B</td ></tr >
7474</tbody >
7575</table >
7676
@@ -82,12 +82,12 @@ CreateOrder returns an Order and publishes OrderCreatedEvent to 2 handlers. Foun
8282<thead >
8383<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
8484</thead >
85- <tbody ><tr ><td style =" width :100% " ><code >Direct_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >30.657 ns</td ><td style =" text-align :right ;white-space :nowrap " >144 B</td ></tr >
86- <tr ><td style =" width :100% " ><code >MediatorNet_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >47.621 ns</td ><td style =" text-align :right ;white-space :nowrap " >144 B</td ></tr >
87- <tr ><td style =" width :100% " ><code >Foundatio_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >124.632 ns</td ><td style =" text-align :right ;white-space :nowrap " >344 B</td ></tr >
88- <tr ><td style =" width :100% " ><code >MediatR_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >167.340 ns</td ><td style =" text-align :right ;white-space :nowrap " >1,168 B</td ></tr >
89- <tr ><td style =" width :100% " ><code >Wolverine_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >2,396.809 ns</td ><td style =" text-align :right ;white-space :nowrap " >4,064 B</td ></tr >
90- <tr ><td style =" width :100% " ><code >MassTransit_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >7,880.173 ns</td ><td style =" text-align :right ;white-space :nowrap " >18,762 B</td ></tr >
85+ <tbody ><tr ><td style =" width :100% " ><code >Direct_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >27.889 ns</td ><td style =" text-align :right ;white-space :nowrap " >144 B</td ></tr >
86+ <tr ><td style =" width :100% " ><code >MediatorNet_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >44.104 ns</td ><td style =" text-align :right ;white-space :nowrap " >144 B</td ></tr >
87+ <tr ><td style =" width :100% " ><code >Foundatio_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >92.445 ns</td ><td style =" text-align :right ;white-space :nowrap " >144 B</td ></tr >
88+ <tr ><td style =" width :100% " ><code >MediatR_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >157.323 ns</td ><td style =" text-align :right ;white-space :nowrap " >1,168 B</td ></tr >
89+ <tr ><td style =" width :100% " ><code >Wolverine_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >2,253.890 ns</td ><td style =" text-align :right ;white-space :nowrap " >4,064 B</td ></tr >
90+ <tr ><td style =" width :100% " ><code >MassTransit_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >7,338.962 ns</td ><td style =" text-align :right ;white-space :nowrap " >18,762 B</td ></tr >
9191</tbody >
9292</table >
9393
@@ -99,12 +99,12 @@ Middleware returns cached result; handler is never invoked. Each library uses it
9999<thead >
100100<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
101101</thead >
102- <tbody ><tr ><td style =" width :100% " ><code >Direct_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >3.099 ns</td ><td style =" text-align :right ;white-space :nowrap " >72 B</td ></tr >
103- <tr ><td style =" width :100% " ><code >MediatorNet_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >13.787 ns</td ><td style =" text-align :right ;white-space :nowrap " >72 B</td ></tr >
104- <tr ><td style =" width :100% " ><code >MediatR_ShortCircuit </code ></td ><td style =" text-align :right ;white-space :nowrap " >58.267 ns</td ><td style =" text-align :right ;white-space :nowrap " >488 B</td ></tr >
105- <tr ><td style =" width :100% " ><code >Foundatio_ShortCircuit </code ></td ><td style =" text-align :right ;white-space :nowrap " >69.557 ns</td ><td style =" text-align :right ;white-space :nowrap " >368 B</td ></tr >
106- <tr ><td style =" width :100% " ><code >Wolverine_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >204.296 ns</td ><td style =" text-align :right ;white-space :nowrap " >752 B</td ></tr >
107- <tr ><td style =" width :100% " ><code >MassTransit_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >5,063.661 ns</td ><td style =" text-align :right ;white-space :nowrap " >12,448 B</td ></tr >
102+ <tbody ><tr ><td style =" width :100% " ><code >Direct_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >2.767 ns</td ><td style =" text-align :right ;white-space :nowrap " >72 B</td ></tr >
103+ <tr ><td style =" width :100% " ><code >MediatorNet_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >12.924 ns</td ><td style =" text-align :right ;white-space :nowrap " >72 B</td ></tr >
104+ <tr ><td style =" width :100% " ><code >Foundatio_ShortCircuit </code ></td ><td style =" text-align :right ;white-space :nowrap " >28.396 ns</td ><td style =" text-align :right ;white-space :nowrap " >168 B</td ></tr >
105+ <tr ><td style =" width :100% " ><code >MediatR_ShortCircuit </code ></td ><td style =" text-align :right ;white-space :nowrap " >56.364 ns</td ><td style =" text-align :right ;white-space :nowrap " >488 B</td ></tr >
106+ <tr ><td style =" width :100% " ><code >Wolverine_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >196.974 ns</td ><td style =" text-align :right ;white-space :nowrap " >752 B</td ></tr >
107+ <tr ><td style =" width :100% " ><code >MassTransit_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >5,558.044 ns</td ><td style =" text-align :right ;white-space :nowrap " >12,448 B</td ></tr >
108108</tbody >
109109</table >
110110
0 commit comments