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 | 9 | 1.13 | 1.000 | 45 | 390 | 2.20× |
compileInner grows by 345 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 | 28 | 230 | +202 | 59% | 1.12× | 1.09 |
| generateOutput (self) | 5 | 43 | +39 | 11% | 1.69× | 1.31 |
| linkIR | 4 | 33 | +29 | 8% | 1.08× | 1.05 |
| legalizeExistentialTypeLayout | 0 | 15 | +15 | 4% | 3.86× | 1.79 |
| legalizeResourceTypes | 0 | 15 | +15 | 4% | 4.02× | 1.81 |
Also growing (below top-5): simplifyIR (+15 ms, 4%), linkAndOptimizeIR (self) (+12 ms, 4%).
Near-constant (≤2% of growth each): compileInner (self) (1→6 ms), specializeModule (1→6 ms), frontEndExecute (self) (1→5 ms), generateIR (1→3 ms), parseTranslationUnit (0→1 ms), performForceInlining (0→0 ms), performMandatoryEarlyInlining (0→0 ms), unrollLoopsInModule (0→0 ms).
| N | compileInner | linkIR |
|---|---|---|
| 50 | 45 | 4 |
| 100 | 85 | 8 |
| 200 | 177 | 16 |
| 400 | 390 | 33 |