Files
codegraph/src/resolution
d510de4766 perf(synthesis): cFnPtrEdges 2.07x at kernel scale — probe-profiled, edge set hash-identical (#1341)
cFnPtrEdges was 86% of kernel-scale synthesis (306s, §7a.3). Standalone
probe iterations against the live kernel DB attributed and fixed:

- sliceLines split the ENTIRE file per node (~1.6M full-file splits across
  the B/D/E sweeps) — split once per file, slice from the line array
  (D 46.2->20.5s, E 94.5->69.1s).
- The 128-entry strip cache re-stripped every file 4.4x across the four
  file sweeps (71.8s). Sizing is now memory-budget-aware and ALL-OR-NOTHING
  with 5% slack over the file count: a partial LRU on cyclic sweeps thrashes
  to ~0% hit (measured twice: cap ~61k and cap == files both thrashed
  against 63.8k + includes). Full-cache strips: exactly 1.0/file, 15.5s.
- Pass D pre-gates field names on fieldToStructs before the two regex type
  resolutions — a->f = b->g matches every struct-field assignment in the
  tree, ~99% of them data fields.
- recvTypeIn/varTypeIn compiled a new RegExp per call - cached per name.
- Line numbers counted incrementally per match (ascending indexes) instead
  of splitting the body prefix per match; cursor rewinds between the two
  dispatch scans.
- CODEGRAPH_SYNTH_TIMINGS now prints per-sweep walls + read/strip/nodes
  accounting for this pass.

278.8s -> 134.8s standalone at the 2c envelope. Output identity proven at
full scale: probe edge set (merge-dedup applied, canonical sort) SHA256
21c2a971... == the original code's 274,762 edges extracted from the live
kernel DB. Pass suite 15/15.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 12:20:17 -05:00
..