Skip to main content

Benchmarks

@brushy/di-core ranked #1 among DI libraries (tsyringe, InversifyJS, awilix) in 8/8 scenarios. Baseline (new direct) is measured separately as overhead reference, not ranked against DI runtimes.

Environment

Results are indicative. Run benchmarks on an idle machine for stable numbers. They are not a substitute for profiling your own app.
Published numbers come from the full suite (time=3000ms, runs=5). CI on main refreshes BENCHMARK.md weekly via .github/workflows/benchmark.yml.

Speed advantage over best competitor

Throughput (p50) by scenario

request_scope: tsyringe and inversify have no native request scope (N/A). Bars are scaled per row (@brushy/di-core = 10 blocks).

Full results and methodology

Run locally

Build @brushy/di-core, then run the benchmark suite from the project root:
For the full CI-equivalent suite (5 runs × 3s per task, updates published artifacts):
Partial runs write gitignored partial-* files under packages/di-bench/results/. Only full runs update latest.* and BENCHMARK.md.