Skip to content

lamLeX/IocPerformance

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Basic Features

Container Singleton Transient Combined Complex
No 61
53
68
62
83
103
90
82
abioc 0.6.0 27
37
31
57
48
84
63
72
Autofac 4.6.0 749
623
707
554
1950
1832
6510
6472
Caliburn.Micro 1.5.2 465
270
533
322
1583
906
7403
3712
Catel 4.5.4 309
356
4119
4510
10048
11082
24815
26422
DryIoc 2.11.5 33
45
42
63
57
80
72
77
DryIocZero 2.7.0 91
75
75
74
107
110
338
231
Dynamo 3.0.2.0 83
81
92
96
201
153
655
384
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.2.1 27
38
35
58
49
82
67
75
Griffin 1.1.4 280
182
304
203
657
431
1888
1114
HaveBox 2.0.0 40
48
51
62
65
88
103
95
IfInjector 0.8.1 75
60
128
97
145
124
197
135
LightCore 1.5.1 184
189
2191
1301
26718
31570
151128*
188142*
LightInject 5.0.3 28
41
36
61
56
81
68
83
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.31.0 215
151
241
168
335
236
680
610
MicroResolver 2.3.4 27
44
36
63
56
78
97
85
MicroSliver 2.1.6.0 193
235
725
611
2394
1613
6829
5881
Microsoft Extensions DependencyInjection 1.1.1 207
268
167
141
463
452
1608
1668
Mugen 3.5.1 484
444
711
751
2285
2494
8297
9494
Munq 3.1.6 90
75
161
107
517
417
1812
1050
Ninject 3.2.2.0 5192
3216
16735
11856
44930
30318
131301*
84559*
Petite 0.3.2 3856
2093
3931
2293
4330
2283
5198
2766
Rezolver 1.2.7050.900 135
104
176
135
227
177
367
238
SimpleInjector 4.0.8 66
68
77
70
103
103
129
105
Spring.NET 2.0.1 950
987
9711
11447
26941
23873
74745*
57777
Stashbox 2.5.3 40
52
48
57
62
87
81
81
StructureMap 4.5.1 1182
961
1259
810
3477
2015
8655
4900
StyleMVVM 3.1.5 441
263
480
299
748
437
1409
795
TinyIoC 1.3 420
473
1683
1081
7344
5164
32219
23617
Unity 4.0.1 2517
1375
3761
1962
10161
5372
27963
16013
Windsor 4.0.0 516
405
1967
1164
5812
3392
17496
9639

Advanced Features

Container Property Generics IEnumerable Conditional Child Container Asp Net Core Interception With Proxy
No 119
99
73
79
177
139
78
69
606
361

72
65
abioc 0.6.0

741
506




Autofac 4.6.0 6527
6417
1949
1563
7715
5635
1453
1406
51226
31640
14292
11982
22099
11690
Caliburn.Micro 1.5.2 9157
4733

5965
3393




Catel 4.5.4
10636
11485




4354
4492
DryIoc 2.11.5 93
104
58
69
294
206
59
77


1302
912
DryIocZero 2.7.0 394
256

319
214
58
62



Dynamo 3.0.2.0 796
467






fFastInjector 1.0.1






Funq 1.0.0.0 1090
639






Grace 6.2.1 87
94
46
77
265
194
55
64
52698
29078
490
390
847
526
Griffin 1.1.4






HaveBox 2.0.0 741
443

1860
1198



774
509
IfInjector 0.8.1 345
227
147
120





LightCore 1.5.1 2289
1755
15862
14477
34754
20480




LightInject 5.0.3 107
93
47
207
263
245
375
299

2276
1616
1346
788
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.31.0 1438
1236
299
292
1610
959




MicroResolver 2.3.4 38
64

281
204




MicroSliver 2.1.6.0






Microsoft Extensions DependencyInjection 1.1.1
226
169
876
521


1888
1812

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

13742
16268
Munq 3.1.6 1536
847






Ninject 3.2.2.0 112654*
76631*
48775
27198
102856*
68908*
34283
22799
46654500*
41128767*

24945
15694
Petite 0.3.2 6684
3636






Rezolver 1.2.7050.900 500
317
218
161
588
364

3143050*
1677185*
10298
7844

SimpleInjector 4.0.8 212
146
75
82
795
451
103
86


7060
4967
Spring.NET 2.0.1 52419
51992





43647
43419
Stashbox 2.5.3 106
105
62
75
301
208
65
71
208124*
117082*
732
537
894
551
StructureMap 4.5.1 8737
4902
2309
1434
8706
5081

3276473*
1793537*
44294
26216
7746
4276
StyleMVVM 3.1.5 1542
914
1234
708
3067
2022
1432
745



TinyIoC 1.3 5676
5769



14183
7663


Unity 4.0.1 29064
16150

43685
23347

33727
19896

93122*
49665
Windsor 4.0.0 34788
19114
14730
8383
16344
9298

233653*
127558*

13738
7473

Prepare

Container Prepare And Register Prepare And Register And Simple Resolve
No 2
3
abioc 0.6.0 5739
5992
Autofac 4.6.0 287
310
Caliburn.Micro 1.5.2 55
56
Catel 4.5.4 7844
8192
DryIoc 2.11.5 99
320
DryIocZero 2.7.0 0
1
Dynamo 3.0.2.0 15818
15809
fFastInjector 1.0.1 6390
6336
Funq 1.0.0.0 8
8
Grace 6.2.1 145
829
Griffin 1.1.4 8442
7933
HaveBox 2.0.0 54925
55463
IfInjector 0.8.1 1397
2016
LightCore 1.5.1 226
204
LightInject 5.0.3 148
647
LinFu 2.3.0.41559 107
338
Maestro 1.5.4 172
747
Mef 4.0.0.0 17
2299
Mef2 1.0.31.0 5614
6830
MicroResolver 2.3.4 27930
66854
MicroSliver 2.1.6.0 11
16
Microsoft Extensions DependencyInjection 1.1.1 26
38
Mugen 3.5.1 424
1820
Munq 3.1.6 9079
9500
Ninject 3.2.2.0 97125*
86107*
Petite 0.3.2 22
41
Rezolver 1.2.7050.900 221
3286
SimpleInjector 4.0.8 651
3339
Spring.NET 2.0.1 25014
24884
Stashbox 2.5.3 73
574
StructureMap 4.5.1 1383
7609
StyleMVVM 3.1.5 69968
71562
TinyIoC 1.3 58
67
Unity 4.0.1 588
2209
Windsor 4.0.0 2985
3137

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

About

Performance comparison of .NET IoC containers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%