A single shader that ramps *several* realistic dimensions together as n grows, modelling how a real shader's compile cost behaves going from simple to highly complex — as opposed to the single-axis stressors, which isolate one pass. Each step adds: a branchy helper (control flow / SSA + phi), a generic call (sema + specialization), a small bounded inner loop, resource reads, and a dynamic-dispatch site. Helpers are chained in bounded-depth groups (call graph depth) so doubling n roughly doubles total work across all of front-end, IR opt, and codegen at once. Sweep this to get the holistic complexity->compile-time curve and a floor+slope fit. Scaling reference (not a null): several axes co-scale, so the sweep's linear line means 'cost tracks code size' — a user-meaningful reference. Standing super-linearity here is expected; the actionable signal is its release-over-release movement.
bucket: realistic_scaling · mode: target · 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× |
|---|---|---|---|---|---|---|
| 160–1280 | 9 | 1.24 | 0.997 | 232 | 2954 | 2.65× |
compileInner grows by 2722 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=160 | t@N=1280 | Δ ms | share | × lin | ∝Nk |
|---|---|---|---|---|---|---|
| generateOutput (self) | 72 | 1258 | +1186 | 44% | 1.87× | 1.38 |
| simplifyIR | 25 | 379 | +354 | 13% | 1.77× | 1.30 |
| linkAndOptimizeIR (self) | 24 | 293 | +268 | 10% | 1.46× | 1.21 |
| SemanticChecking | 65 | 302 | +237 | 9% | 0.74× | 0.77 |
| legalizeExistentialTypeLayout | 5 | 231 | +226 | 8% | 3.55× | 1.83 |
Also growing (below top-5): legalizeResourceTypes (+224 ms, 8%), specializeModule (+99 ms, 4%), generateIR (+92 ms, 3%).
Near-constant (≤2% of growth each): linkIR (3→13 ms), parseTranslationUnit (2→12 ms), performMandatoryEarlyInlining (1→9 ms), performForceInlining (1→4 ms), unrollLoopsInModule (0→2 ms), frontEndExecute (self) (0→0 ms), compileInner (self) (1→0 ms).
| N | compileInner | frontEndExecute | linkAndOptimizeIR | simplifyIR |
|---|---|---|---|---|
| 160 | 232 | 83 | 78 | 25 |
| 320 | 487 | 133 | 176 | 55 |
| 640 | 1114 | 232 | 440 | 128 |
| 1280 | 2954 | 423 | 1274 | 379 |