n distinct generic functions with interface constraints, each instantiated at several concrete types. Stresses semantic checking, generic constraint satisfaction and instantiation in the front-end. Scaling null: n scales instantiation count against a fixed generic set; ideal checking cost is O(n).
bucket: sema · mode: module · flags: (none)
compileInner split into phase buckets (named leaves + (self) residuals) stacked across the sweep sizes — the top edge is compileInner, so you can see which phase drives the scaling.
floor-subtracted power-law fit (t − floor) = a·Nk; floor = the minimal workload (fixed per-compile cost), k the global exponent, top-2× the local high-end doubling ratio.
| N range | floor (ms) | k (work) | fit R² | t(Nmin) | t(Nmax) | top-2× |
|---|---|---|---|---|---|---|
| 125–1000 | 11 | 0.96 | 0.999 | 126 | 865 | 2.01× |
compileInner grows by 739 ms across the sweep; the mutually-exclusive phase buckets below partition that growth exactly (no nested-timer double counting). × lin is the same metric as the top-level panels, per bucket: the end point vs a linear expectation anchored to the bucket's share of the minimal floor and fitted on the low-N half — 1.0 = grew exactly linearly, >1 bends up. The super-linearity lives where × lin (and k) are red.
| bucket | t@N=125 | t@N=1000 | Δ ms | share | × lin | ∝Nk |
|---|---|---|---|---|---|---|
| SemanticChecking | 108 | 705 | +597 | 81% | 0.91× | 0.92 |
| generateIR | 12 | 120 | +108 | 15% | 1.42× | 1.16 |
| generateOutput (self) | 4 | 30 | +26 | 3% | 1.22× | 1.18 |
Near-constant (≤2% of growth each): parseTranslationUnit (1→10 ms), frontEndExecute (self) (0→0 ms).
| N | compileInner | SemanticChecking | frontEndExecute |
|---|---|---|---|
| 125 | 126 | 108 | 121 |
| 250 | 227 | 194 | 219 |
| 500 | 431 | 365 | 417 |
| 1000 | 865 | 707 | 837 |