You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A test costs about 50x an assertion. For a 2300-test suite that is ~18 s of
per-test machinery — which is why #801–#851 went after per-test forks rather
than the assertion layer.
Not the obvious causes
Checked, so the next person does not re-check:
Not forks. A PATH-shim census over 30 binaries counts 12 forks for 500
tests. The per-test path is genuinely fork-free.
Not the capture subshell. A bare $( ) is ~0.46 ms here, ~6% of the
7.8 ms.
No optimization found in this pass. Filing because the numbers are the
useful part: they say assertion micro-optimization is not worth doing, give a
regression signal for #830 (per-test cost climbing with suite size), and save
the next attempt from re-deriving them.
Measured
Sequential, macOS, repeated runs:
assert_sameA test costs about 50x an assertion. For a 2300-test suite that is ~18 s of
per-test machinery — which is why #801–#851 went after per-test forks rather
than the assertion layer.
Not the obvious causes
Checked, so the next person does not re-check:
tests. The per-test path is genuinely fork-free.
$( )is ~0.46 ms here, ~6% of the7.8 ms.
10x range, so the perf(runner): unset each file's test functions after processing #830 fn-accumulation fix still holds.
Outcome
No optimization found in this pass. Filing because the numbers are the
useful part: they say assertion micro-optimization is not worth doing, give a
regression signal for #830 (per-test cost climbing with suite size), and save
the next attempt from re-deriving them.
Recorded in
.claude/rules/perf-fork-budget.md.