Lookup 0
This benchmark is designed to test the lookup performance of each container. One small object is resolved from the container along with 0 dummy registrations that are located at warmup time. 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 | 1465.0 | 1464.6 | 1466.3 | 0 | 0.624 | 0.161 | 0 | 0 | 1808 |
Castle Windsor | Clr | 6126.8 | 6126.0 | 6162.2 | 0 | 17.482 | 4.514 | 0 | 0 | 1856 |
DryIoc | Clr | 25.6 | 25.6 | 25.6 | 0 | 0.001 | 0.000 | 0 | 0 | 56 |
Grace | Clr | 22.5 | 22.5 | 22.5 | 0 | 0.003 | 0.001 | 0 | 0 | 56 |
LightInject | Clr | 25.2 | 25.2 | 25.2 | 0 | 0.003 | 0.001 | 0 | 0 | 56 |
Microsoft Dependency Injection | Clr | 133.6 | 133.6 | 133.6 | 1 | 0.003 | 0.001 | 0 | 0 | 56 |
NInject | Clr | 11703.9 | 11751.3 | 11949.5 | 0 | 184.083 | 49.198 | 330 | 0 | 5890 |
Simple Injector | Clr | 52.0 | 52.0 | 52.0 | 0 | 0.017 | 0.004 | 0 | 0 | 56 |
StructureMap | Clr | 1772.8 | 1772.9 | 1773.2 | 0 | 0.286 | 0.074 | 0 | 0 | 1984 |
Autofac | Core | 1798.8 | 1798.9 | 1799.9 | 0 | 0.663 | 0.171 | 0 | 0 | 1808 |
Castle Windsor | Core | 9913.3 | 9912.5 | 9929.2 | 0 | 9.489 | 2.450 | 0 | 0 | 2696 |
DryIoc | Core | 26.5 | 26.5 | 26.5 | 0 | 0.003 | 0.001 | 0 | 0 | 56 |
Grace | Core | 21.5 | 21.5 | 21.5 | 0 | 0.002 | 0.001 | 0 | 0 | 56 |
LightInject | Core | 26.9 | 26.9 | 26.9 | 1 | 0.002 | 0.000 | 0 | 0 | 56 |
Microsoft Dependency Injection | Core | 117.9 | 117.9 | 117.9 | 0 | 0.021 | 0.005 | 0 | 0 | 56 |
NInject | Core | 15024.6 | 15025.9 | 15317.4 | 0 | 206.149 | 57.175 | 317 | 2 | 5722 |
Simple Injector | Core | 39.7 | 39.7 | 39.8 | 0 | 0.021 | 0.006 | 0 | 0 | 56 |
StructureMap | Core | 2098.3 | 2098.3 | 2099.5 | 1 | 0.480 | 0.128 | 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