Performance comparison of .NET IoC containers
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
IocPerformance Updated several containers Nov 3, 2018
docs Updated several containers Nov 3, 2018
libs/Funq.1.0 -Migrated to VS 2017 format Sep 2, 2017
.gitignore -Migrated to VS 2017 format Sep 2, 2017
IocPerformance.sln -Migrated to VS 2017 format Sep 2, 2017
LICENSE.txt Initial import. Mar 13, 2012
README.md Updated several containers Nov 3, 2018

README.md

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 1 minute and result is extrapolated.

Basic Features

Container Singleton Transient Combined Complex
No 41
49
49
59
69
76
99
103
abioc 0.7.0 27
38
32
54
48
73
64
71
Autofac 4.8.1 908
914
804
818
1917
2140
6597
7581
Caliburn.Micro 1.5.2 465
270
533
322
1583
906
7403
3712
Catel 5.7.0 286
409
4599
6231
11101
14717
24974
35235
Cauldron.Activator 3.2.3 36
51
50
64
86
103
197
152
DryIoc 3.0.2 32
47
43
63
57
88
75
81
DryIocZero 4.0.0 110
96
88
89
98
105
220
169
Dynamo 3.0.2 95
70
104
86
207
158
685
381
fFastInjector 1.0.1 66
66
126
99
249
171
602
350
Funq 1.0.0.0 118
90
137
110
381
251
1124
616
Grace 6.4.2 49
45
40
60
65
79
86
97
Griffin 1.1.9 300
205
318
226
719
476
2004
1228
HaveBox 2.0.0 40
48
51
62
65
88
103
95
IfInjector 0.8.1 75
60
128
97
145
124
197
135
Lamar 1.1.2 86
79
104
128
142
138
159
175
LightCore 1.5.1 184
189
2191
1301
26718
31570
151128*
188142*
LightInject 5.2.0 50
57
54
62
68
87
92
102
LinFu 2.3.0.41559 3167
1709
16506
11878
45492
29568
116514*
76757*
Maestro 1.5.4 356
254
1755
2906
2437
1743
4342
2528
Mef 4.0.0.0 22679
11820
37640
25052
57462
68730*
112712*
131716*
Mef2 1.0.33.0 276
260
341
265
425
374
901
654
MicroResolver 2.3.5 25
39
34
59
55
77
92
89
MicroSliver 2.1.6 192
232
742
619
2394
1786
7159
6162
Microsoft Extensions DependencyInjection 2.1.1 86
81
115
106
163
136
197
158
Mugen 3.5.1 484
444
711
751
2285
2494
8297
9494
Munq 3.1.6 90
75
161
107
517
417
1812
1050
MvvmCross 6.2.1 252
329
1117
1206
2945
3742
8279
10881
Ninject 3.3.4 3473
2563
8686
6969
23529
17635
63579*
49285
Rezolver 1.3.4 177
136
202
156
265
207
409
271
SimpleInjector 4.4.0 64
71
91
97
140
126
143
146
Spring.NET 2.0.1 950
987
9711
11447
26941
23873
74745*
57777
Stashbox 2.6.3 33
48
45
67
85
76
132
96
StructureMap 4.7.0 1256
838
1418
976
3402
2081
8433
5066
Unity 5.8.6 302
281
437
405
1282
1095
3962
3553
Windsor 4.1.1 501
509
2270
1773
7009
5753
21178
16403

Advanced Features

Container Property Generics IEnumerable Conditional Child Container Asp Net Core Interception With Proxy
No 186
134
70
75
193
176
53
63
644
596

469
438
abioc 0.7.0

743
453




Autofac 4.8.1 6299
8246
1982
2161
7889
8397
1311
1544
70219*
55666
16308
16321
23726
16331
Caliburn.Micro 1.5.2 9157
4733

5965
3393




Catel 5.7.0
14467
17843




6373
7685
Cauldron.Activator 3.2.3 65
76
80
84
358
256



54
72
DryIoc 3.0.2 111
113
57
85
273
201
54
69

1000
677
848
542
DryIocZero 4.0.0 294
205
92
92
302
229
380
270



Dynamo 3.0.2 828
455






fFastInjector 1.0.1






Funq 1.0.0.0 1090
639






Grace 6.4.2 127
126
59
68
348
298
61
63
52454
43244
561
528
1025
845
Griffin 1.1.9






HaveBox 2.0.0 741
443

1860
1198



774
509
IfInjector 0.8.1 345
227
147
120





Lamar 1.1.2 103
120
121
131
684
569


1018
913

LightCore 1.5.1 2289
1755
15862
14477
34754
20480




LightInject 5.2.0 125
139
66
75
287
316
316
334

4981
4322
1550
1285
LinFu 2.3.0.41559






Maestro 1.5.4 4502
2616
2103
2128
4443
2483
2186
1691


7591
4418
Mef 4.0.0.0 124500*
133833*
137086*
114221*
97231*
100896*




Mef2 1.0.33.0 1525
1272
310
299
1554
1273




MicroResolver 2.3.5 39
62

262
195




MicroSliver 2.1.6






Microsoft Extensions DependencyInjection 2.1.1
138
127
417
288


1051
710

Mugen 3.5.1 10005
8348
72189*
72787*
5619
7027
1824
1883
550418*
335171*

13742
16268
Munq 3.1.6 1536
847






MvvmCross 6.2.1 1062
1324
7407
9805


4736
4202


Ninject 3.3.4 62765*
47908
24256
15895
64193*
49074
19294
12954
73303000*
50234113*

20215
15029
Rezolver 1.3.4 558
366
236
186
8943
5103

8162125*
4734064*
8679
6836

SimpleInjector 4.4.0 282
234
124
117
929
771
100
97


7844
6134
Spring.NET 2.0.1 52419
51992





43647
43419
Stashbox 2.6.3 137
134
76
82
289
327
120
78
317947*
279766*
880
1268
994
839
StructureMap 4.7.0 8664
5149
2337
1469
8317
4945

3145150*
1803094*
40510
25145
7512
4604
Unity 5.8.6 4097
3333
1396
1210
4815
4031
1042
861
7035
9942
16895
18546

Windsor 4.1.1 39991
33185
20830
16604
19126
14203

241132*
180365*

16551
12023

Prepare

Container Prepare And Register Prepare And Register And Simple Resolve
No 2
2
abioc 0.7.0 5672
6613
Autofac 4.8.1 421
445
Caliburn.Micro 1.5.2 55
56
Catel 5.7.0 12275
12276
Cauldron.Activator 3.2.3 0
0
DryIoc 3.0.2 59
217
DryIocZero 4.0.0 0
1
Dynamo 3.0.2 16240
16527
fFastInjector 1.0.1 6390
6336
Funq 1.0.0.0 8
8
Grace 6.4.2 159
936
Griffin 1.1.9 8387
8960
HaveBox 2.0.0 54925
55463
IfInjector 0.8.1 1397
2016
Lamar 1.1.2 2166
438660*
LightCore 1.5.1 226
204
LightInject 5.2.0 115
703
LinFu 2.3.0.41559 107
338
Maestro 1.5.4 172
747
Mef 4.0.0.0 17
2299
Mef2 1.0.33.0 6053
7259
MicroResolver 2.3.5 27322
67518
MicroSliver 2.1.6 12
17
Microsoft Extensions DependencyInjection 2.1.1 24
32
Mugen 3.5.1 424
1820
Munq 3.1.6 9079
9500
MvvmCross 6.2.1 12
17
Ninject 3.3.4 130706*
126470*
Rezolver 1.3.4 10647
16189
SimpleInjector 4.4.0 776
3515
Spring.NET 2.0.1 25014
24884
Stashbox 2.6.3 95
504
StructureMap 4.7.0 1280
7448
Unity 5.8.6 84
79
Windsor 4.1.1 3331
4042

Charts

Basic features Advanced features Prepare

Machine

The benchmark was executed on the following machine:
CPU: Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz
Memory: 15,89GB