Lazy
This benchmark registers a small object then resolves the object using Lazy(T). 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 | 2682.2 | 2682.5 | 2686.7 | 0 | 2.160 | 0.558 | 0 | 0 | 2856 |
Castle Windsor | Clr | 24738.5 | 24735.8 | 24831.4 | 0 | 60.088 | 16.059 | 119 | 0 | 5126 |
DryIoc | Clr | 2015.2 | 2012.8 | 2025.2 | 0 | 6.903 | 1.845 | 0 | 0 | 592 |
Grace | Clr | 284.0 | 284.0 | 284.0 | 0 | 0.030 | 0.008 | 0 | 0 | 336 |
LightInject | Clr | 174.6 | 174.6 | 174.7 | 0 | 0.010 | 0.002 | 0 | 0 | 144 |
Simple Injector | Clr | 175.2 | 175.2 | 175.2 | 0 | 0.011 | 0.003 | 0 | 0 | 144 |
StructureMap | Clr | 5699.2 | 5698.7 | 5704.0 | 0 | 3.228 | 0.833 | 0 | 0 | 3384 |
Autofac | Core | 3393.4 | 3393.4 | 3397.3 | 0 | 1.845 | 0.476 | 0 | 0 | 2856 |
Castle Windsor | Core | 34577.4 | 34581.6 | 34757.6 | 1 | 76.116 | 20.343 | 75 | 0 | 6933 |
DryIoc | Core | 1830.8 | 1830.3 | 1844.8 | 0 | 5.548 | 1.432 | 0 | 0 | 592 |
Grace | Core | 212.6 | 212.5 | 212.8 | 0 | 0.130 | 0.036 | 0 | 0 | 336 |
LightInject | Core | 195.2 | 195.2 | 195.3 | 0 | 0.013 | 0.003 | 0 | 0 | 144 |
Simple Injector | Core | 196.8 | 196.8 | 196.8 | 0 | 0.007 | 0.002 | 0 | 0 | 144 |
StructureMap | Core | 6053.4 | 6055.3 | 6070.9 | 0 | 10.891 | 2.911 | 0 | 0 | 3384 |
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