Skip to content

benchmarks/IocPerformance

 
 

Repository files navigation

Ioc Performance

Build Status

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.8.0 26
43
33
56
51
82
67
78
Autofac 6.4.0 820
589
970
663
2648
1675
8048
5021
Caliburn.Micro 1.5.2 465
270
533
322
1583
906
7403
3712
Catel 5.12.22 250
296
3979
4314
8954
9876
25104
23025
DryIoc 4.8.5 63
54
73
73
89
100
110
101
DryIocZero 4.0.0 110
96
88
89
98
105
220
169
Dynamo 3.0.2 95
70
104
86
207
158
685
381
Faster.Ioc 1.0.0 25
46
72
62
67
82
139
93
Grace 7.2.1 20
31
39
55
52
84
73
83
Lamar 8.0.1 61
63
86
83
117
110
130
127
LightInject 6.6.1 40
49
53
60
85
91
167
128
Maestro 3.6.6 386
269
342
241
580
438
1411
1097
Mef 4.0.0.0 22679
11820
37640
25052
57462
68730*
112712*
131716*
Mef2 6.0.0.0 217
152
210
162
322
268
724
416
MicroResolver 2.3.5 25
39
34
59
55
77
92
89
Microsoft Extensions DependencyInjection 6.0.0 65
57
108
82
108
109
150
115
Microsoft.VisualStudio.Composition 17.2.41 9738
5088
13203
9883
20881
16572
55582
49981
Mugen MVVM Toolkit 6.5.0 102
138
409
715
2052
2590
9348
11352
MvvmCross 8.0.2 205
251
1318
1402
3316
3726
8677
9516
Ninject 3.3.6 3809
4583
13588
11986
37822
28199
105486*
79549*
Pure.DI 1.1.55 24
36
38
60
62
81
80
91
Rezolver 2.1.0 121
100
137
126
194
171
328
238
SimpleInjector 5.4.1 87
67
71
91
152
129
233
179
Singularity 0.18.0 24
39
39
59
66
82
76
84
Spring.NET 3.0.0 553
446
2533
1535
8190
5084
23729
15167
Stashbox 5.4.3 62
61
112
68
85
113
186
167
StructureMap 4.7.1 1121
717
1281
856
3410
2166
8312
6052
Unity 5.11.10 216
148
1443
835
3326
1995
9503
4739
Windsor 5.1.2 473
406
2815
1308
9305
4215
21281
12262
ZenIoc 1.0.1 306
198
267
188
674
440
1809
1103
Zenject 8.0.0 479
448
1370
1070
3689
3065
11142
10106

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.8.0

799
506




Autofac 6.4.0 8548
7022
2059
1481
10702
5475
2258
1645
75196*
69767*
45323
39283
22455
14802
Caliburn.Micro 1.5.2 9157
4733

5965
3393




Catel 5.12.22
8872
9710




3937
4257
DryIoc 4.8.5 144
131
86
88
294
219
81
79

1379
1005
835
555
DryIocZero 4.0.0 294
205
92
92
302
229
380
270



Dynamo 3.0.2 828
455






Faster.Ioc 1.0.0
95
87
388
287
107
66

797
635

Grace 7.2.1 101
112
50
80
257
210
45
70
50375
32231
657
674
827
571
Lamar 8.0.1 133
98
106
108
634
432


4753
4323

LightInject 6.6.1 195
214
85
83
384
244
454
281

2246
1488
1484
1040
Maestro 3.6.6 3886
2438
419
318
1272
843


10764
8560
6757
3630
Mef 4.0.0.0 124500*
133833*
137086*
114221*
97231*
100896*




Mef2 6.0.0.0 1390
928
363
223
1212
811




MicroResolver 2.3.5 39
62

262
195




Microsoft Extensions DependencyInjection 6.0.0
108
101
336
251


3725
2785

Microsoft.VisualStudio.Composition 17.2.41 44751
52108

85109*
40759




Mugen MVVM Toolkit 6.5.0 436
705

9749
7094

4370
3103


MvvmCross 8.0.2 1310
1415
6576
7299


4968
3230


Ninject 3.3.6 78292*
60394*
28241
20249
92792*
68004*
24794
18311
78784000*
45766768*

22231
19065
Pure.DI 1.1.55 47
68
57
100
201
174
52
71


242
227
Rezolver 2.1.0 520
385
183
145
669
408

9589857*
5697265*
86587*
56374

SimpleInjector 5.4.1 366
204
99
103
755
738
85
83


5503
4220
Singularity 0.18.0
54
80
241
193


631
652

Spring.NET 3.0.0 18982
11962





18461
11065
Stashbox 5.4.3 221
189
61
87
366
230
61
73
795236*
419952*
1926
2247
1774
740
StructureMap 4.7.1 8697
5284
2271
1460
8399
5170

3215578*
1887211*
65269*
41725
7859
4464
Unity 5.11.10 9045
5814
9842
6443
17755
12048
3547
2046
147355*
74313*
61350*
39009
56226
31096
Windsor 5.1.2 44988
24115
25168
10238
19471
10795

300485*
157429*

15799
11699
ZenIoc 1.0.1 264
195
276
209
704
488
314
222
602490*
471765*


Zenject 8.0.0 15829
13135
9021
6513
17932
12687
3082
2428
22250
18595


Prepare

Container Prepare And Register Prepare And Register And Simple Resolve
No 2
2
abioc 0.8.0 6327
6556
Autofac 6.4.0 386
425
Caliburn.Micro 1.5.2 55
56
Catel 5.12.22 11925
9956
DryIoc 4.8.5 56
64
DryIocZero 4.0.0 0
1
Dynamo 3.0.2 16240
16527
Faster.Ioc 1.0.0 51
1283
Grace 7.2.1 157
966
Lamar 8.0.1 2516
3044
LightInject 6.6.1 123
2232
Maestro 3.6.6 128
144
Mef 4.0.0.0 17
2299
Mef2 6.0.0.0 4978
7954
MicroResolver 2.3.5 27322
67518
Microsoft Extensions DependencyInjection 6.0.0 42
70
Microsoft.VisualStudio.Composition 17.2.41 15753
10223
Mugen MVVM Toolkit 6.5.0 15
19
MvvmCross 8.0.2 10
16
Ninject 3.3.6 134240*
112279*
Pure.DI 1.1.55 0

Rezolver 2.1.0 20835
27706
SimpleInjector 5.4.1 825
3214
Singularity 0.18.0 314
874
Spring.NET 3.0.0 14198
14141
Stashbox 5.4.3 46
1929
StructureMap 4.7.1 1325
7389
Unity 5.11.10 122
287
Windsor 5.1.2 2993
3344
ZenIoc 1.0.1 77
964
Zenject 8.0.0 199
201

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

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%