NoArgFactory
This benchmark registers a small object using a factory to provide one piece of the object graph. The code can be found here.
Container | Env | Mean (ns) | Median (ns) | Max (ns) | Outliers | Std Dev (ns) | Std Err (ns) | Gen 1 | Gen 2 | Bytes Alloc |
---|---|---|---|---|---|---|---|---|---|---|
Autofac | Clr | 1589.2 | 1589.4 | 1590.8 | 0 | 0.984 | 0.254 | 0 | 0 | 1656 |
Castle Windsor | Clr | 5717.3 | 5715.6 | 5734.2 | 0 | 8.236 | 2.127 | 0 | 0 | 2096 |
DryIoc | Clr | 51.2 | 51.2 | 51.2 | 1 | 0.006 | 0.002 | 0 | 0 | 56 |
Grace | Clr | 42.6 | 42.6 | 42.6 | 1 | 0.005 | 0.002 | 0 | 0 | 56 |
LightInject | Clr | 91.7 | 91.7 | 91.7 | 0 | 0.009 | 0.002 | 0 | 0 | 56 |
Microsoft Dependency Injection | Clr | 165.5 | 165.5 | 165.5 | 1 | 0.011 | 0.003 | 0 | 0 | 56 |
Simple Injector | Clr | 72.9 | 72.9 | 72.9 | 0 | 0.013 | 0.003 | 0 | 0 | 56 |
StructureMap | Clr | 1666.2 | 1666.1 | 1667.5 | 0 | 0.467 | 0.121 | 0 | 0 | 1984 |
Autofac | Core | 1861.0 | 1860.9 | 1862.1 | 0 | 0.599 | 0.155 | 0 | 0 | 1656 |
Castle Windsor | Core | 9841.9 | 9841.7 | 9865.6 | 0 | 12.077 | 3.350 | 0 | 0 | 2640 |
DryIoc | Core | 53.1 | 53.1 | 53.1 | 0 | 0.009 | 0.002 | 0 | 0 | 56 |
Grace | Core | 44.6 | 44.6 | 44.6 | 1 | 0.003 | 0.001 | 0 | 0 | 56 |
LightInject | Core | 49.9 | 49.9 | 49.9 | 0 | 0.004 | 0.001 | 0 | 0 | 56 |
Microsoft Dependency Injection | Core | 145.3 | 145.3 | 145.8 | 0 | 0.228 | 0.059 | 0 | 0 | 56 |
Simple Injector | Core | 63.0 | 63.0 | 63.0 | 0 | 0.003 | 0.001 | 0 | 0 | 56 |
StructureMap | Core | 2070.4 | 2070.3 | 2071.1 | 0 | 0.433 | 0.120 | 0 | 0 | 1984 |
Details
BenchmarkDotNet=v0.10.8, OS=Windows 10 Redstone 2 (10.0.15063)
Processor=Intel Core i7-3770 CPU 3.40GHz (Ivy Bridge), ProcessorCount=4
Frequency=3320336 Hz, Resolution=301.1743 ns, Timer=TSC
[Host] : Clr 4.0.30319.42000, 64bit RyuJIT-v4.7.2101.1
Clr : Clr 4.0.30319.42000, 64bit RyuJIT-v4.7.2101.1
Core : .NET Core 4.6.25211.01, 64bit RyuJIT