Skip to content

Repository files navigation

.NET Matrix

Open the interactive .NET Matrix →

Evidence-based feature and performance comparisons for .NET libraries.

Dependency Injection

Benchmark overview

Performance and allocated memory are shown together. Lower values are better.

Dependency Injection Basic benchmark overview

Dependency Injection Advanced benchmark overview

Dependency Injection Prepare benchmark overview

Libraries

Autofac logo Autofac 9.3.1
A flexible inversion of control container for building extensible .NET applications.
Castle Windsor logo Castle Windsor 6.0.0
The Castle Project container, with bound lifestyles and Castle DynamicProxy interception.
Catel logo Catel 6.2.0
An MVVM application framework whose service locator and type factory perform constructor injection.
DryIoc logo DryIoc 5.4.3
A fast, small and feature-rich container with expression-compiled resolution and rich reuse options.
Faster.Ioc logo Faster.Ioc 5.0.0
A minimalistic container focused on the shortest possible resolve path.
Grace logo Grace 7.2.1
A container with a fluent registration model, per-object-graph lifestyles and decorator support.
Lamar logo Lamar 16.0.0
The successor to StructureMap, built around runtime code generation.
LightInject logo LightInject 7.1.0
A lightweight container with an ultra-small API surface and its own interception package.
Maestro logo Maestro 3.6.6
A small container with a fluent configuration API and pluggable activation interceptors.
Managed Extensibility Framework 2 logo Managed Extensibility Framework 2 10.0.10
The lightweight Managed Extensibility Framework composition engine shipped as System.Composition.
Microsoft Extensions Dependency Injection logo Microsoft Extensions Dependency Injection 10.0.10
The built-in .NET dependency injection container and its service collection abstractions.
MvvmCross logo MvvmCross 10.1.2
A cross-platform MVVM framework with its own inversion of control provider.
Ninject logo Ninject 3.3.6
A container built around fluent bindings, contextual conditions and pluggable extensions.
Pure.DI logo Pure.DI 2.5.2
A compile-time dependency injection framework that generates strongly typed compositions.
Simple Injector logo Simple Injector 5.6.0
A fast, opinionated dependency injection library that promotes explicit configuration and maintainable application design.
Singularity logo Singularity 0.18.0
An expression-tree based container that validates the whole object graph when the container is built.
Spring.NET logo Spring.NET 3.0.3
The Spring.NET application framework and its XML or code configured object factory.
Stashbox logo Stashbox 5.20.0
A fast container with per-request lifetimes, conditional registrations and child containers.
StructureMap logo StructureMap 4.7.1
A mature container with a fluent registry DSL, nested containers and decorators.
Unity logo Unity 5.11.10
The Unity container, offering per-resolve lifetimes and hierarchical child containers.
Visual Studio MEF logo Visual Studio MEF 17.13.41
The Visual Studio composition engine, a fast attribute-driven MEF implementation.
ZenIoc logo ZenIoc 1.0.1
A tiny container with compiled registrations, named resolution and nested containers.

Benchmark scenarios

01 · Singleton

Dependency Injection Singleton benchmark

02 · Transient

Dependency Injection Transient benchmark

03 · PerResolve

Dependency Injection PerResolve benchmark

04 · Scoped

Dependency Injection Scoped benchmark

05 · Combined

Dependency Injection Combined benchmark

06 · Complex

Dependency Injection Complex benchmark

07 · Property

Dependency Injection Property benchmark

08 · Generics

Dependency Injection Generics benchmark

09 · IEnumerable

Dependency Injection IEnumerable benchmark

10 · Array

Dependency Injection Array benchmark

11 · Conditional

Dependency Injection Conditional benchmark

12 · Child Container

Dependency Injection Child Container benchmark

13 · Interception With Proxy

Dependency Injection Interception With Proxy benchmark

14 · Prepare And Register

Dependency Injection Prepare And Register benchmark

15 · Prepare And Register And Simple Resolve

Dependency Injection Prepare And Register And Simple Resolve benchmark

About

Evidence-based feature and performance comparisons for .NET libraries.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages