n importable modules plus a main that imports and uses all of them. The harness precompiles each module to .slang-module, then compiles main against them, stressing module read + linkIR. Scaling null: n scales module count, each O(1); ideal load+link cost is O(n).
bucket: module_link · mode: link · flags: -target spirv -emit-spirv-directly
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× |
|---|---|---|---|---|---|---|
| 50–400 | 14 | 1.18 | 0.997 | 54 | 490 | 2.44× |
compileInner grows by 436 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=50 | t@N=400 | Δ ms | share | × lin | ∝Nk |
|---|---|---|---|---|---|---|
| SemanticChecking | 31 | 247 | +216 | 50% | 1.18× | 1.10 |
| generateOutput (self) | 5 | 55 | +50 | 11% | 2.12× | 1.37 |
| linkIR | 5 | 49 | +44 | 10% | 1.37× | 1.14 |
| simplifyIR | 3 | 38 | +35 | 8% | 1.75× | 1.29 |
| linkAndOptimizeIR (self) | 3 | 38 | +35 | 8% | 2.07× | 1.38 |
Also growing (below top-5): legalizeResourceTypes (+16 ms, 4%), legalizeExistentialTypeLayout (+16 ms, 4%), specializeModule (+11 ms, 3%), generateIR (+10 ms, 2%).
Near-constant (≤2% of growth each): compileInner (self) (1→2 ms), parseTranslationUnit (0→1 ms), frontEndExecute (self) (0→0 ms), performForceInlining (0→0 ms), performMandatoryEarlyInlining (0→0 ms), unrollLoopsInModule (0→0 ms).
| N | compileInner | linkIR |
|---|---|---|
| 50 | 54 | 5 |
| 100 | 98 | 9 |
| 200 | 201 | 19 |
| 400 | 490 | 49 |