Ioc Performance

October 8, 2018 ยท View on GitHub

This

Source code of my performance comparison of the most popular .NET IoC containers:
www.palmmedia.de/Blog/2011/8/30/ioc-container-benchmark-performance-comparison

Author: Daniel Palme
Blog: www.palmmedia.de
Twitter: @danielpalme

Results

Explantions

First value: Time of single-threaded execution in [ms]
Second value: Time of multi-threaded execution in [ms]
*: Benchmark was stopped after 1 minute and result is extrapolated.

Basic Features

ContainerSingletonTransientCombinedComplex
No43
48
46
57
81
77
76
82
abioc 0.7.043
43
39
49
64
63
60
77
Autofac 4.8.1594
639
630
537
1980
1766
6417
6534
Caliburn.Micro 1.5.2395
229
472
272
1390
771
5888
3145
Catel 5.6.0258
301
3981
4475
8873
9712
20584
22965
Cauldron.Activator 3.0.3234
41
44
60
75
84
175
130
DryIoc 3.0.231
41
44
61
56
79
66
70
DryIocZero 4.0.098
76
75
76
86
94
206
144
Dynamo 3.0.285
68
93
83
207
139
621
348
fFastInjector 1.0.169
53
116
92
242
166
558
319
Funq 1.0.0.0109
81
133
106
366
245
1075
592
Grace 6.4.123
38
34
60
45
72
56
63
Griffin 1.1.9274
175
291
195
628
386
1758
988
HaveBox 2.0.038
45
47
61
64
80
97
87
IfInjector 0.8.178
59
116
86
138
116
188
130
Lamar 1.1.163
56
79
76
104
101
119
101
LightCore 1.5.1173
168
2281
1254
25409
35011
144838*
198335*
LightInject 5.1.826
37
31
58
47
76
63
62
LinFu 2.3.0.415593037
1644
16419
10338
41746
25356
108167*
62903*
Maestro 1.5.4329
237
389
265
912
563
2831
1536
Mef 4.0.0.020118
10987
32123
19262
54379
50162
107807*
131680*
Mef2 1.0.33.0207
136
220
153
321
214
609
352
MicroResolver 2.3.526
40
33
59
50
69
89
79
MicroSliver 2.1.6202
227
753
520
2395
1643
6677
5764
Microsoft Extensions DependencyInjection 2.1.177
64
108
90
135
119
187
131
Mugen 3.5.1476
460
708
798
2063
2775
7717
10160
Munq 3.1.685
68
119
98
472
303
1561
857
MvvmCross 6.1.2229
252
922
992
2572
2732
7434
7995
Ninject 3.3.42613
1890
7584
6263
22328
15373
61634*
45643
Rezolver 1.3.4165
116
181
136
246
184
378
235
SimpleInjector 4.3.065
56
84
70
92
89
119
96
Spring.NET 2.0.1890
891
9550
13180
26494
30451
69669*
77039*
Stashbox 2.6.130
38
36
61
51
77
64
70
StructureMap 4.7.0994
557
1159
709
3203
1795
7992
4478
Unity 5.8.6270
162
376
249
1108
634
3327
1835
Windsor 4.1.0426
286
1776
973
5787
3108
16675
8985
Zenject 7.3.0437
549
1286
932
3610
2987
9963
6737

Advanced Features

ContainerPropertyGenericsIEnumerableConditionalChild ContainerAsp Net CoreInterception With Proxy
No141
98
53
67
195
124
58
57
543
324

439
310
abioc 0.7.0

914
431




Autofac 4.8.16660
6301
1774
1414
7448
6011
1175
1137
67161*
35810
10851
9262
20654
10711
Caliburn.Micro 1.5.27819
4036

5951
3160




Catel 5.6.0
8820
9452




3939
4247
Cauldron.Activator 3.0.3244
64
65
72
285
193



612
399
DryIoc 3.0.2115
98
49
79
253
170
58
65

870
538
787
469
DryIocZero 4.0.0270
182
78
78
268
183
333
224



Dynamo 3.0.2733
417






fFastInjector 1.0.1






Funq 1.0.0.01043
606






Grace 6.4.192
89
44
77
244
162
48
58
43497
23765
439
326
794
469
Griffin 1.1.9






HaveBox 2.0.0732
452

1647
954



677
429
IfInjector 0.8.1350
220
134
113





Lamar 1.1.183
81
121
101
517
317


809
478

LightCore 1.5.12046
1670
15474
17370
35033
26530




LightInject 5.1.8100
98
41
72
238
161
328
202

2380
1682
1301
731
LinFu 2.3.0.41559






Maestro 1.5.43002
1619
660
415
2943
1631
902
533


5998
3270
Mef 4.0.0.0113888*
137699*
129008*
109517*
89816*
110240*




Mef2 1.0.33.01229
721
266
179
1303
737




MicroResolver 2.3.534
54

251
175




MicroSliver 2.1.6






Microsoft Extensions DependencyInjection 2.1.1
129
110
389
238


942
600

Mugen 3.5.110338
10368
55300
57507
5407
7695
1638
2153
573933*
376419*

14189
29322
Munq 3.1.61469
818






MvvmCross 6.1.2948
1027
6198
6536


4088
2418


Ninject 3.3.458388
41062
24518
15220
61256*
42380
19949
11790
435571000*
365734939*

17204
14491
Rezolver 1.3.4534
325
239
172
8946
4642

8179875*
4415881*
9143
6857

SimpleInjector 4.3.0218
148
70
77
742
407
78
72


7165
4037
Spring.NET 2.0.151391
62415*





42185
54271
Stashbox 2.6.1106
99
48
72
257
170
52
58
317873*
219028*
676
1042
848
497
StructureMap 4.7.08417
4696
2223
1315
8352
4592

3196473*
1749431*
44306
25318
7541
4091
Unity 5.8.63332
1881
1144
661
4049
2263
834
467
5863
9406
14369
13913

Windsor 4.1.032879
17795
14091
7517
14856
8174

205541*
108275*

13683
7150
Zenject 7.3.013240
8144
6796
4149
13243
8863
2923
2307
21211
11956


Prepare

ContainerPrepare And RegisterPrepare And Register And Simple Resolve
No1
1
abioc 0.7.06048
5631
Autofac 4.8.1276
288
Caliburn.Micro 1.5.248
49
Catel 5.6.017604
18036
Cauldron.Activator 3.0.320
0
DryIoc 3.0.253
246
DryIocZero 4.0.00
1
Dynamo 3.0.216854
16871
fFastInjector 1.0.17283
7401
Funq 1.0.0.07
7
Grace 6.4.1137
858
Griffin 1.1.99131
9201
HaveBox 2.0.051547
51582
IfInjector 0.8.11326
1968
Lamar 1.1.11804
325983*
LightCore 1.5.1172
188
LightInject 5.1.8178
800
LinFu 2.3.0.4155994
330
Maestro 1.5.4174
785
Mef 4.0.0.014
2119
Mef2 1.0.33.05079
6485
MicroResolver 2.3.526713
65064
MicroSliver 2.1.611
15
Microsoft Extensions DependencyInjection 2.1.120
27
Mugen 3.5.1428
1757
Munq 3.1.610195
10276
MvvmCross 6.1.29
12
Ninject 3.3.4864750*
828996*
Rezolver 1.3.410680
16192
SimpleInjector 4.3.0623
3106
Spring.NET 2.0.122250
22311
Stashbox 2.6.160
510
StructureMap 4.7.01374
7347
Unity 5.8.664
66
Windsor 4.1.02847
2882
Zenject 7.3.0137
146

Charts