Skip to content

Repository files navigation

Ioc Performance

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 3 minutes and result is extrapolated.
OoM: Benchmark was stopped after an OutOfMemoryException was thrown.
Error: Benchmark was stopped after an Exception was thrown.

Basic Features

ContainerSingletonTransientCombinedComplex
No108
78
126
116
147
168
222
206
Autofac 3.5.2893
723
2568
2571
6407
4071
18191
11244
Caliburn.Micro 1.5.2538
353
670
405
1867
1085
7969
4632
Catel 4.0.0339
408
5262
6654
13926
16622
36149
39037
DryIoc 1.4.131
48
42
57
56
83
92
81
Dynamo 3.0.2.0105
80
134
103
234
162
823
493
fFastInjector 0.8.1105
81
143
120
194
143
295
203
Funq 1.0.0.0149
111
181
132
451
338
1327
852
Grace 2.4.2188
127
303
294
907
926
2061
1291
Griffin 1.1.2374
231
377
243
971
573
2813
1548
HaveBox 2.0.091
76
110
95
122
87
222
194
Hiro 1.0.4.41795207
140
209
146
219
154
290
199
IfInjector 0.8.1108
86
144
115
180
142
233
166
LightCore 1.5.1203
171
3364
1998
34315
34496
193101*
205435*
LightInject 3.0.2.034
44
46
61
69
76
88
84
LinFu 2.3.0.415594163
2443
24399
16041
64412
41898
170694
104578
Maestro 1.5.0993
631
1046
685
1718
917
4534
3592
Mef 4.0.0.034967
19746
53521
31946
87598
65396
175864
169289
Mef2 1.0.27.0295
201
290
204
379
439
633
403
MicroSliver 2.1.6.0566
303
818
543
2901
1802
8322
8170
Mugen 3.5.1459
359
810
582
2380
1666
9042
6674
Munq 3.1.6111
79
283
192
751
454
2389
1482
Ninject 3.2.2.07259
4486
24276
15296
69214
39610
191033*
117563
Petite 0.3.26626
4071
5546
3373
6971
4657
8246
6118
QuickInject 1.0.0.12180
173
198
169
295
259
671
637
SimpleInjector 2.6.163
68
99
84
121
105
171
129
Spring.NET 1.3.21046
808
16566
10128
45510
29798
117230
75645
StructureMap 3.1.4.1432531
2831
2787
2845
8181
8274
19198
20205
StyleMVVM 3.1.5656
454
543
383
833
527
2170
2363
TinyIoC 1.2421
323
2705
1698
13719
6623
44567
28659
Unity 3.5.1404.02873
3812
7182
3038
15294
8012
39116
21296
Windsor 3.3.0519
383
2626
3658
8893
4861
26098
16700

Advanced Features

ContainerPropertyGenericsIEnumerableConditionalChild ContainerInterception With Proxy
No348
176
107
106
275
177
214
180
1899
524
88
106
Autofac 3.5.232706
20892
5158
3346
17288
12199

108964
86101
51505
37712
Caliburn.Micro 1.5.210427
6064

7758
4514



Catel 4.0.0
16803
26672



9122
5947
DryIoc 1.4.197
87
64
70
318
225
68
69


Dynamo 3.0.2.0855
519





fFastInjector 0.8.1





Funq 1.0.0.01299
789





Grace 2.4.22828
1589
707
467
2601
1645
805
536
17498
10605
8723
5580
Griffin 1.1.2





HaveBox 2.0.01119
697

2252
1373


868
538
Hiro 1.0.4.417953104
1931





IfInjector 0.8.1385
269
170
131




LightCore 1.5.12487
1843
23120
15653
52456
31250



LightInject 3.0.2.092
84
63
72
360
249
69
71

1825
1345
LinFu 2.3.0.41559





Maestro 1.5.09514
2744
1036
655
5297
2919
1306
801

11811
6419
Mef 4.0.0.0180329*
178984
198621*
151746
137126
140873



Mef2 1.0.27.01383
887
313
228
2587
2518



MicroSliver 2.1.6.0





Mugen 3.5.111883
7521
71914
76734
6944
7444
2060
1369
706941*
OoM
5051527*
Error
Munq 3.1.61899
1169





Ninject 3.2.2.0165177
106569
67347
42019
151450
96672
53576
31926
45724250*
37677615*
36162
22413
Petite 0.3.26297
3789





QuickInject 1.0.0.12204
182



1280234*
919692*

SimpleInjector 2.6.1268
194
102
91
1214
597
222
169

8573
5065
Spring.NET 1.3.2103584
66296




77502
43561
StructureMap 3.1.4.14318987
19486
5485
8342
17175
18164

3921913*
2703535*
18162
12085
StyleMVVM 3.1.52391
1093
1407
881
3703
4850
1598
965


TinyIoC 1.25275
5538



17576
11517

Unity 3.5.1404.040234
21537

65395
41530

53041
31885
128682
82599
Windsor 3.3.052083
32659
27157
17004
26641
13537

340330*
Error
21772
13042

Charts

Basic featuresAdvanced features

About

Performance comparison of .NET IoC containers

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages