Skip to content

Commit a7b232c

Browse files
committed
docs: record performance measurement lessons from the cold compile work
1 parent 6998c6f commit a7b232c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎AGENTS.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,19 @@
6666
affects analysis, validation, or caching must report all three.
6767
- Performance fixes must not reduce coverage. Show that diagnostics are unchanged or a strict,
6868
validated superset on the dense benchmark and a real-project run.
69+
- When load makes wall times unreliable, compare `perf stat -e instructions:u` (repeat runs agree
70+
to about 0.05%). Instruction counts cannot show overlap, so judge parallelism and background-work
71+
changes by paired wall time from quiet runs.
72+
- Before timing a candidate, prove its extension binary contains the change (for example, a new
73+
symbol or string in the built `.so`); a stale build silently measures the base.
74+
- Read the timeline for main-thread/pool alternation: serial native loops on the main thread while
75+
the pool idles cost more wall time than CPU-heavy phases that already use every core.
76+
- Work that runs concurrently with another phase saves wall time only while it is the longer of the
77+
two; identify the critical path before optimising one side. Report the overlapped phase's own
78+
timing too, because background work can slow the phase it overlaps by as much as it saves.
79+
- Speculative early work must verify or discard: compare a digest of the real request at the normal
80+
call site, hold cache writes until adoption, never run user code early, and treat start, panic
81+
or evaluation failures as misses that fall back to the normal path.
6982
- Do not raise performance budgets or tolerances to make a regression pass.
7083
- Temporary user-approved exception (2026-10-10), removable after post-conversion memory
7184
optimisation: only the 10,000-model case in `test_fresh_process_compile_cache_performance.py`

0 commit comments

Comments
 (0)