CreateScopeAndResolve
This benchmark creates a lifetime scope and then resolves a small object from the child scope. 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 | 2070.6 | 2071.2 | 2078.8 | 0 | 3.896 | 1.006 | 0 | 0 | 2560 |
Castle Windsor | Clr | 9353.0 | 9349.1 | 9382.4 | 0 | 15.166 | 3.916 | 0 | 0 | 2424 |
DryIoc | Clr | 114.9 | 114.9 | 115.0 | 0 | 0.019 | 0.005 | 0 | 0 | 320 |
Grace | Clr | 77.6 | 77.6 | 77.6 | 0 | 0.005 | 0.001 | 0 | 0 | 184 |
LightInject | Clr | 278.2 | 278.2 | 278.3 | 0 | 0.054 | 0.015 | 0 | 0 | 328 |
Microsoft Dependency Injection | Clr | 343.1 | 343.1 | 343.1 | 0 | 0.013 | 0.004 | 0 | 0 | 264 |
StructureMap | Clr | 19076.6 | 19066.3 | 19181.9 | 0 | 51.019 | 13.173 | 92 | 0 | 13011 |
Autofac | Core | 2529.4 | 2529.6 | 2534.5 | 0 | 3.463 | 0.894 | 0 | 0 | 2560 |
Castle Windsor | Core | 13488.5 | 13482.9 | 13522.0 | 0 | 16.967 | 4.381 | 0 | 0 | 3496 |
DryIoc | Core | 121.3 | 121.3 | 121.3 | 0 | 0.012 | 0.003 | 0 | 0 | 320 |
Grace | Core | 88.5 | 88.5 | 88.5 | 0 | 0.011 | 0.003 | 0 | 0 | 184 |
LightInject | Core | 284.9 | 284.9 | 284.9 | 0 | 0.041 | 0.011 | 0 | 0 | 328 |
Microsoft Dependency Injection | Core | 324.4 | 324.4 | 324.4 | 0 | 0.027 | 0.007 | 0 | 0 | 264 |
StructureMap | Core | 21332.1 | 21320.4 | 21431.6 | 0 | 53.851 | 13.904 | 85 | 0 | 10283 |
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