IEnumerable
This benchmark registers 5 small objects then resolves them as an IEnumerable(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 | 11489.8 | 11490.0 | 11497.2 | 0 | 5.218 | 1.395 | 0 | 0 | 9968 |
DryIoc | Clr | 316.7 | 316.7 | 316.8 | 0 | 0.048 | 0.012 | 0 | 0 | 464 |
Grace | Clr | 290.1 | 290.1 | 290.1 | 0 | 0.056 | 0.015 | 0 | 0 | 464 |
LightInject | Clr | 287.9 | 287.9 | 287.9 | 1 | 0.013 | 0.004 | 0 | 0 | 464 |
Microsoft Dependency Injection | Clr | 425.0 | 425.0 | 425.0 | 0 | 0.033 | 0.009 | 0 | 0 | 464 |
Simple Injector | Clr | 137.1 | 137.1 | 137.1 | 0 | 0.028 | 0.007 | 0 | 0 | 0 |
StructureMap | Clr | 7707.5 | 7705.7 | 7722.8 | 0 | 7.463 | 1.927 | 0 | 0 | 4792 |
Autofac | Core | 15160.6 | 15162.1 | 15178.8 | 0 | 11.694 | 3.125 | 0 | 0 | 9808 |
DryIoc | Core | 203.9 | 203.9 | 204.0 | 0 | 0.037 | 0.010 | 0 | 0 | 464 |
Grace | Core | 213.2 | 213.2 | 213.2 | 0 | 0.022 | 0.006 | 0 | 0 | 464 |
LightInject | Core | 207.1 | 207.0 | 207.2 | 0 | 0.053 | 0.014 | 0 | 0 | 464 |
Microsoft Dependency Injection | Core | 229.0 | 229.0 | 229.1 | 0 | 0.038 | 0.010 | 0 | 0 | 464 |
Simple Injector | Core | 116.9 | 116.9 | 117.0 | 0 | 0.062 | 0.016 | 0 | 0 | 0 |
StructureMap | Core | 8555.4 | 8555.7 | 8563.8 | 0 | 6.434 | 1.661 | 0 | 0 | 4640 |
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