Skip to content

BalintPogatsa/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 41
49
49
59
69
76
99
103
abioc 0.8.0 26
43
33
56
51
82
67
78
Autofac 4.9.3 569
382
704
475
1927
1183
5727
3449
Caliburn.Micro 1.5.2 465
270
533
322
1583
906
7403
3712
Catel 5.11.2 262
308
4283
4695
9693
10646
22248
24653
DryIoc 4.0.5 33
47
48
76
68
103
79
89
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 7.0.0 25
45
35
55
54
87
68
79
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 3.0.5 60
63
69
76
92
128
115
136
LightCore 1.5.1 184
189
2191
1301
26718
31570
151128*
188142*
LightInject 5.5.0 29
49
36
60
54
86
75
82
LinFu 2.3.0.41559 3167
1709
16506
11878
45492
29568
116514*
76757*
Maestro 3.6.0 329
229
304
215
543
387
1483
962
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.2.0 81
69
124
107
148
143
197
159
Mugen 3.5.1 484
444
711
751
2285
2494
8297
9494
Mugen MVVM Toolkit 6.5.0 102
138
409
715
2052
2590
9348
11352
Munq 3.1.6 90
75
161
107
517
417
1812
1050
MvvmCross 6.3.1 240
283
996
1123
2627
2889
7351
8498
Ninject 3.3.4 3473
2563
8686
6969
23529
17635
63579*
49285
Rezolver 2.0.0 91
98
120
93
174
147
303
231
SimpleInjector 4.6.2 59
67
76
75
99
110
119
101
Singularity 0.13.0 32
44
37
57
52
83
66
77
Spring.NET 2.0.1 950
987
9711
11447
26941
23873
74745*
57777
Stashbox 2.7.8 34
47
46
68
61
86
77
83
StructureMap 4.7.1 1121
717
1281
856
3410
2166
8312
6052
Unity 5.8.6 302
281
437
405
1282
1095
3962
3553
Windsor 5.0.0 437
350
1821
1108
6402
3712
20536
11821
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 4.9.3 5853
3461
2104
1286
8141
5264
1396
870
75656*
45789
32221
19866
21376
12564
Caliburn.Micro 1.5.2 9157
4733

5965
3393




Catel 5.11.2
9585
10434




4295
4634
DryIoc 4.0.5 122
121
58
87
316
218
56
74

1867
1394
836
545
Dynamo 3.0.2 828
455






fFastInjector 1.0.1






Funq 1.0.0.0 1090
639






Grace 7.0.0 110
109
50
80
266
201
47
69
52706
30542
786
750
902
602
Griffin 1.1.9






HaveBox 2.0.0 741
443

1860
1198



774
509
IfInjector 0.8.1 345
227
147
120





Lamar 3.0.5 74
80
89
133
519
Error


1667
1563

LightCore 1.5.1 2289
1755
15862
14477
34754
20480




LightInject 5.5.0 122
141
52
81
296
225
331
227

14895
9956
1492
927
LinFu 2.3.0.41559






Maestro 3.6.0 3402
2335
514
294
1598
1079


9639
7096
10385
3878
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.2.0
149
130
430
303


2852
1840

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

13742
16268
Mugen MVVM Toolkit 6.5.0 436
705

9749
7094

4370
3103


Munq 3.1.6 1536
847






MvvmCross 6.3.1 1236
1343
6518
6917


4151
2704


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

20215
15029
Rezolver 2.0.0 454
360
139
156
490
354

6570200*
4095208*
59211
33867

SimpleInjector 4.6.2 243
181
80
92
842
508
82
80


8282
4409
Singularity 0.13.0
49
83
287
214


530
560

Spring.NET 2.0.1 52419
51992





43647
43419
Stashbox 2.7.8 125
119
58
83
304
222
59
69
174697*
99904*
1647
1429
832
554
StructureMap 4.7.1 8697
5284
2271
1460
8399
5170

3215578*
1887211*
65269*
41725
7859
4464
Unity 5.8.6 4097
3333
1396
1210
4815
4031
1042
861
7035
9942
38392
31255

Windsor 5.0.0 38096
19775
15557
9071
17839
10135

239286*
140421*

13662
7695
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 4.9.3 414
470
Caliburn.Micro 1.5.2 55
56
Catel 5.11.2 100278*
100744*
DryIoc 4.0.5 73
79
Dynamo 3.0.2 16240
16527
fFastInjector 1.0.1 6390
6336
Funq 1.0.0.0 8
8
Grace 7.0.0 171
942
Griffin 1.1.9 8387
8960
HaveBox 2.0.0 54925
55463
IfInjector 0.8.1 1397
2016
Lamar 3.0.5 2350
2741
LightCore 1.5.1 226
204
LightInject 5.5.0 115
774
LinFu 2.3.0.41559 107
338
Maestro 3.6.0 145
157
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.2.0 22
30
Mugen 3.5.1 424
1820
Mugen MVVM Toolkit 6.5.0 15
19
Munq 3.1.6 9079
9500
MvvmCross 6.3.1 10
13
Ninject 3.3.4 130706*
126470*
Rezolver 2.0.0 12625
18413
SimpleInjector 4.6.2 667
3205
Singularity 0.13.0 30
439
Spring.NET 2.0.1 25014
24884
Stashbox 2.7.8 70
256
StructureMap 4.7.1 1325
7389
Unity 5.8.6 84
79
Windsor 5.0.0 2954
2990
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

About

Performance comparison of .NET IoC containers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%