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.
build-astbuild-chain-abuild-chain-bbuild-chain-cbuild-chain-dbuild-clibuild-collectionsbuild-compilerbuild-corebuild-lexerbuild-loggingbuild-orphanbuild-parserbuild-reportbuild-runtimebuild-stringsbuild-test-utilsbuild-tokensbuild-webguard-astguard-chain-aguard-chain-bguard-chain-cguard-chain-dguard-cliguard-collectionsguard-compilerguard-coreguard-lexerguard-loggingguard-orphanguard-parserguard-reportguard-runtimeguard-stringsguard-test-utilsguard-tokensguard-webpre-committest-asttest-chain-atest-chain-btest-chain-ctest-chain-dtest-clitest-collectionstest-compilertest-coretest-lexertest-loggingtest-orphantest-parsertest-reporttest-runtimetest-stringstest-test-utilstest-tokenstest-webworkspaceProjectsconfiguredevShellallTestsbuild-astbuild-chain-abuild-chain-bbuild-chain-cbuild-chain-dbuild-clibuild-collectionsbuild-compilerbuild-corebuild-lexerbuild-loggingbuild-orphanbuild-parserbuild-reportbuild-runtimebuild-stringsbuild-test-utilsbuild-tokensbuild-webfile-ast--tests-nodes-test-tsfile-ast--tests-walk-test-tsfile-chain-a--tests-report-test-tsfile-chain-b--tests-sum-test-tsfile-chain-c--tests-twice-test-tsfile-chain-d--tests-step-test-tsfile-cli--tests-cli-test-tsfile-collections--tests-chunk-test-tsfile-collections--tests-multimap-test-tsfile-compiler--tests-compile-test-tsfile-core--tests-hash-test-tsfile-core--tests-outcome-test-tsfile-lexer--tests-lexer-test-tsfile-lexer--tests-throughput-test-tsfile-logging--tests-logger-test-tsfile-orphan--tests-base32-test-tsfile-parser--tests-parser-test-tsfile-parser--tests-roundtrip-test-tsfile-report--tests-report-test-tsfile-runtime--tests-agreement-test-tsfile-runtime--tests-vm-test-tsfile-strings--tests-pad-test-tsfile-strings--tests-slug-test-tsfile-test-utils--tests-expressions-test-tsfile-test-utils--tests-random-test-tsfile-tokens--tests-token-test-tsfile-web--tests-render-test-tsguard-astguard-chain-aguard-chain-bguard-chain-cguard-chain-dguard-cliguard-collectionsguard-compilerguard-coreguard-lexerguard-loggingguard-orphanguard-parserguard-reportguard-runtimeguard-stringsguard-test-utilsguard-tokensguard-webinstallInputsnarrow-ast--tests-nodes-test-tsnarrow-ast--tests-walk-test-tsnarrow-chain-a--tests-report-test-tsnarrow-chain-b--tests-sum-test-tsnarrow-chain-c--tests-twice-test-tsnarrow-chain-d--tests-step-test-tsnarrow-cli--tests-cli-test-tsnarrow-collections--tests-chunk-test-tsnarrow-collections--tests-multimap-test-tsnarrow-compiler--tests-compile-test-tsnarrow-core--tests-hash-test-tsnarrow-core--tests-outcome-test-tsnarrow-lexer--tests-lexer-test-tsnarrow-lexer--tests-throughput-test-tsnarrow-logging--tests-logger-test-tsnarrow-orphan--tests-base32-test-tsnarrow-parser--tests-parser-test-tsnarrow-parser--tests-roundtrip-test-tsnarrow-report--tests-report-test-tsnarrow-runtime--tests-agreement-test-tsnarrow-runtime--tests-vm-test-tsnarrow-strings--tests-pad-test-tsnarrow-strings--tests-slug-test-tsnarrow-test-utils--tests-expressions-test-tsnarrow-test-utils--tests-random-test-tsnarrow-tokens--tests-token-test-tsnarrow-web--tests-render-test-tsnodeModulespnpmDepstest-asttest-chain-atest-chain-btest-chain-ctest-chain-dtest-clitest-collectionstest-compilertest-coretest-lexertest-loggingtest-orphantest-parsertest-reporttest-runtimetest-stringstest-test-utilstest-tokenstest-webworkspaceProjectsx86_64-linux