A large module of `n` public functions, compiled to a .slang-module. Stresses IR/AST serialization (writeSerializedModule*) — the write side of the cost whose read side (readSerializedModule*) the `minimal` floor test and module loading exercise. Scaling null: n scales function count; ideal serialization cost is O(n).
bucket: ir_infra · 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× |
|---|---|---|---|---|---|---|
| 375–3000 | 10 | 1.18 | 0.995 | 44 | 406 | 2.56× |
compileInner grows by 362 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=375 | t@N=3000 | Δ ms | share | × lin | ∝Nk |
|---|---|---|---|---|---|---|
| generateIR | 12 | 203 | +192 | 53% | 2.28× | 1.40 |
| SemanticChecking | 25 | 152 | +127 | 35% | 0.97× | 0.97 |
| generateOutput (self) | 5 | 34 | +29 | 8% | 1.19× | 1.15 |
| parseTranslationUnit | 2 | 15 | +13 | 4% | 1.07× | 1.04 |
Near-constant (≤2% of growth each): compileInner (self) (0→1 ms), frontEndExecute (self) (0→0 ms).
| N | compileInner | writeSerializedModuleAST |
|---|---|---|
| 375 | 44 | 2 |
| 750 | 79 | 4 |
| 1500 | 159 | 9 |
| 3000 | 406 | 19 |