Lookup 2000
This benchmark is designed to test the lookup performance of each container. One small object is resolved from the container along with 2000 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 | 1533.4 | 1533.4 | 1534.1 | 0 | 0.279 | 0.072 | 0 | 0 | 1808 |
Castle Windsor | Clr | 6014.8 | 6012.8 | 6043.2 | 0 | 11.020 | 2.845 | 0 | 0 | 1856 |
DryIoc | Clr | 32.9 | 32.9 | 32.9 | 2 | 0.005 | 0.001 | 0 | 0 | 56 |
Grace | Clr | 26.1 | 26.1 | 26.1 | 0 | 0.003 | 0.001 | 0 | 0 | 56 |
LightInject | Clr | 24.4 | 24.4 | 24.4 | 0 | 0.005 | 0.001 | 0 | 0 | 56 |
Microsoft Dependency Injection | Clr | 133.5 | 133.5 | 133.5 | 0 | 0.006 | 0.001 | 0 | 0 | 56 |
NInject | Clr | 11583.6 | 11570.1 | 12395.9 | 0 | 406.075 | 64.206 | 924 | 0 | 5812 |
Simple Injector | Clr | 53.3 | 53.3 | 53.4 | 0 | 0.049 | 0.013 | 0 | 0 | 56 |
StructureMap | Clr | 1680.8 | 1680.7 | 1681.2 | 0 | 0.218 | 0.058 | 0 | 0 | 1984 |
Autofac | Core | 1725.6 | 1725.6 | 1726.0 | 0 | 0.182 | 0.049 | 0 | 0 | 1808 |
Castle Windsor | Core | 10564.4 | 10563.4 | 10585.2 | 1 | 10.730 | 3.097 | 0 | 0 | 2696 |
DryIoc | Core | 34.2 | 34.2 | 34.3 | 0 | 0.036 | 0.010 | 0 | 0 | 56 |
Grace | Core | 29.7 | 29.7 | 29.7 | 0 | 0.002 | 0.001 | 0 | 0 | 56 |
LightInject | Core | 25.5 | 25.4 | 25.5 | 0 | 0.030 | 0.008 | 0 | 0 | 56 |
Microsoft Dependency Injection | Core | 128.0 | 128.4 | 132.0 | 0 | 2.481 | 0.620 | 0 | 0 | 56 |
NInject | Core | 14903.9 | 14883.8 | 15317.2 | 0 | 262.445 | 67.763 | 150 | 0 | 5775 |
Simple Injector | Core | 44.0 | 44.0 | 44.0 | 0 | 0.005 | 0.001 | 0 | 0 | 56 |
StructureMap | Core | 2075.7 | 2075.5 | 2076.6 | 0 | 0.495 | 0.132 | 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