50a61d7f

By: syd <syd@kronor.io>

Amortise evaluation, and stop claiming a precise atomization penalty

The per-unit breakdown is now measured: of 1177 ms for one leaf test
derivation, 816 ms is Nix evaluation, 292 ms is Vitest, and 69 ms is stdenv
plus assembling the tree. Two consequences.

Evaluation is a fixed cost per invocation, not per unit, and the scaling
section shows it barely moves with workspace size. Amortised across a 19-unit
invocation, Nix costs 156 ms per unit of work against Nx 341 ms: about twice as
fast, not slower. It looks slower only when building a single unit, where one
invocation fixed cost lands on one unit.

That also finishes off the shared-skeleton plan this document once called the
first thing to do. It could only ever have recovered the 69 ms line: 6% of one
unit, 2% of a nineteen-unit run, in exchange for a shared derivation holding the
sources that would become an input to every test.

The atomization penalty for Nix is withdrawn as a number. Two runs of the same
measurement gave +18% and +2%, so "small" is all the data supports. The case
against per-test-file granularity does not need it: the invalidation gain is
proportionally worse, 22/27 against 14/19, and the enumeration hazard is real.

Total

10m38s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 0s 2s 2s 2s 0s
Eval 1s 10m09s 10m09s 10m11s 0s
Build 5s 3s 10m33s 10m38s 23s
Suite 0s 10m15s 10m38s 10m38s 23s

Timeline

Config Eval Build Compressed gap
0s1m2m3m4m5m6m7m8m9m10m