← board

perf: C parse+codegen shows mild superlinear scaling on very large amalgamations

Data (native, current compiler)

Not urgent

No timeout/failure — test-sqlite-threads and friends have generous deadlines and pass. The preprocessor quadratics that did cause the Track T flaky-timeouts are already fixed. This ticket only records the finding so a future perf pass has a starting point.

Where to look (unprofiled — needs a phase timer)

Split the ~31.6s across parse vs IR-build vs codegen vs ELF first (no phase timing exists today; add coarse timers around ParseCProgram / IR / codegen / writeELF). Candidate weak-quadratics for a large single translation unit: any per-global or per-proc pass that scans all prior globals/procs (O(n²)), forward-reference/fixup resolution, or a linear scan keyed by count that the symbol hash doesn't cover.

Gate

Emitted code byte-identical; self-host fixedpoint unaffected; measurable throughput improvement on sqlite3.c.