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 | 11 | 1.06 | 1.000 | 56 | 419 | 2.04× |
compileInner grows by 363 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 | 36 | 284 | +248 | 68% | 1.05× | 1.06 |
| linkIR | 5 | 49 | +45 | 12% | 1.30× | 1.15 |
| generateOutput (self) | 5 | 26 | +22 | 6% | 1.22× | 1.11 |
| simplifyIR | 2 | 15 | +13 | 4% | 0.99× | 0.96 |
| linkAndOptimizeIR (self) | 2 | 14 | +12 | 3% | 1.02× | 0.97 |
Also growing (below top-5): specializeModule (+11 ms, 3%), generateIR (+9 ms, 3%).
Near-constant (≤2% of growth each): legalizeExistentialTypeLayout (0→1 ms), legalizeResourceTypes (0→1 ms), parseTranslationUnit (0→1 ms), frontEndExecute (self) (0→1 ms), performForceInlining (0→0 ms), performMandatoryEarlyInlining (0→0 ms), unrollLoopsInModule (0→0 ms), compileInner (self) (0→0 ms).
| N | compileInner | linkIR |
|---|---|---|
| 50 | 56 | 5 |
| 100 | 107 | 10 |
| 200 | 205 | 22 |
| 400 | 419 | 49 |