diff --git a/docs/introduction/performance.md b/docs/introduction/performance.md index cb30c880..a164dfcf 100644 --- a/docs/introduction/performance.md +++ b/docs/introduction/performance.md @@ -64,6 +64,12 @@ across-run dispersion of each side's own median. Rival versions: dishka 1.10.1, dependency-injector 4.49.1, that-depends 4.0.2, wireup 2.12.0. Generated by `just bench-report`. +> **These numbers are a snapshot of the version named above; a newer release does not update +> them.** The tables are regenerated by hand, so they lag a release rather than ship with one. If +> you are running a later modern-di, nothing below has been re-measured against it: run +> `just bench-report` yourself (see [Reproduce it yourself](#reproduce-it-yourself)) to measure +> the version you have. + Each cell is modern-di ÷ rival: below 1.0 (bold) means modern-di is faster, above 1.0 means slower. Every ratio is **paired within each run** — one run measures both sides under the same machine state, so the published statistic is the median of the per-run ratios, @@ -125,8 +131,8 @@ _Across-run IQR of each side's own median (5 runs): modern-di ≤1.9%, rivals that-depends, whose implied C2 absolute is unchanged at ~83 ns. that-depends remains faster on C2 warm-singleton (1.90); the suite does not decompose its `resolve_sync` cache-hit path, so no mechanism is asserted for the remaining gap. -- **Against the two `exec`-codegen frameworks, the by-type table has crossed over.** modern-di - is now faster than `dishka` on C1 (**0.91**) and C2 (**0.81**), and faster than `wireup` on +- **Against the two `exec`-codegen frameworks, the by-type table has crossed over.** At 3.3.0 + modern-di is faster than `dishka` on C1 (**0.91**) and C2 (**0.81**), and faster than `wireup` on C3 (**0.90**) while level on C1 (1.01). One publication earlier it was slower than both on every one of these cells. dishka keeps a clear lead on C3 (1.30), the deepest graph, which is consistent with the per-node call frame that `exec`-inlined source removes and modern-di @@ -134,7 +140,7 @@ _Across-run IQR of each side's own median (5 runs): modern-di ≤1.9%, rivals still dominates. modern-di does not generate code (a [documented non-goal](design-decisions.md#non-goals)); the gap closed by removing frames from the interpreted path instead. -- **The by-type surcharge is now small enough to stop mattering.** Dividing modern-di's +- **At 3.3.0 the by-type surcharge is small enough to stop mattering.** Dividing modern-di's by-reference cells by its by-type ones gives a fixed cost of 21/17/23 ns on C1/C2/C3, against 54-65 ns one publication earlier. `Container.resolve` no longer delegates to `resolve_provider` — it carries that body itself — so what remains is close to the bare