Skip to main content

Benchmarks

Awaiten wires the graph at build time, so there is nothing to reflect over at runtime. These benchmarks compare it against Microsoft.Extensions.DependencyInjection, Autofac, DryIoc and Simple Injector across the same graphs. Pick a scenario; every multiple is relative to Awaiten.

A per-request pattern, the shape a web app actually runs: open a scope, resolve a deep graph of mixed lifetimes rooted at a request handler, then dispose the scope.

285.7 nsper request with Awaiten

The next fastest container, DryIoc, takes 1.5× as long, and MS.DI takes 2.2× as long.

Time

lower is better
Awaiten285.7 ns
DryIoc440.8 ns1.5×
MS.DI638.0 ns2.2×
Simple Injector806.5 ns2.8×
Autofac6.96 µs24×

Memory

lower is better
Awaiten568 B
DryIoc944 B1.7×
Simple Injector1.07 KiB1.9×
MS.DI1.08 KiB1.9×
Autofac10.53 KiB19×

Bars longer than four times the fastest container are cut so the others stay comparable. Hover a bar or a multiple for the exact comparison.

ContainerTimevs AwaitenMemoryvs AwaitenTime vs Awaiten, recent runs
Awaiten285.7 nsbaseline568 Bbaseline
DryIoc5.4.3440.8 ns1.5×944 B1.7×DryIoc compared to Awaiten over the last 16 runs; the dashed line marks equal time
MS.DI10.0.14638.0 ns2.2×1.08 KiB1.9×MS.DI compared to Awaiten over the last 16 runs; the dashed line marks equal time
Simple Injector5.6.0806.5 ns2.8×1.07 KiB1.9×Simple Injector compared to Awaiten over the last 16 runs; the dashed line marks equal time
Autofac9.3.46.96 µs24×10.53 KiB19×Autofac compared to Awaiten over the last 16 runs; the dashed line marks equal time
Measured on 2026-11-07 at commit 68538ab5BenchmarkDotNet MediumRun (in-process)ubuntu-latestView the benchmark source on GitHub →
How these numbers are measured
  • Suite: Awaiten.Benchmarks driven by BenchmarkDotNet.
  • Job: MediumRun with the in-process toolchain.
  • Runner: ubuntu-latest GitHub Actions agent, refreshed on every push to main.
  • Sizes: Build and Resolve are measured at container sizes of 8 and 256 registrations.
  • Trend: the recent runs compare each container with Awaiten in the same run, so the line does not depend on the speed of the runner. The dashed line marks equal time.