← all workloads

complexity_ladder

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

Phase composition vs N (stacked sub-counters)

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.

complexity_ladder — phase composition vs N (v2026.12, median ms) complexity_ladder 19.3× over N 160→1280 0.0 2457 4915 160 320 640 1280 N complexity_ladder — parseTranslationUnit complexity_ladder — SemanticChecking complexity_ladder — generateIR complexity_ladder — frontEndExecute (self) complexity_ladder — specializeModule complexity_ladder — simplifyIR complexity_ladder — linkIR complexity_ladder — unrollLoopsInModule complexity_ladder — legalizeResourceTypes complexity_ladder — legalizeExistentialTypeLayout complexity_ladder — performMandatoryEarlyInlining complexity_ladder — performForceInlining complexity_ladder — linkAndOptimizeIR (self) complexity_ladder — generateOutput (self) complexity_ladder — compileInner (self) phase buckets parseTranslationUnit SemanticChecking generateIR frontEndExecute (self) specializeModule simplifyIR linkIR unrollLoopsInModule legalizeResourceTypes legalizeExistentialTypeLayout performMandatoryEarlyInlining performForceInlining linkAndOptimizeIR (self) emitEntryPointsSourceFromIR generateOutput (self) compileInner (self)

Scaling analysis

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 rangefloor (ms)k (work)fit R²t(Nmin)t(Nmax)top-2×
160–1280141.450.99523545513.19×

Growth attribution (N=160 → N=1280)

compileInner grows by 4315 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.

buckett@N=160t@N=1280Δ msshare× lin∝Nk
simplifyIR401556+151635%3.75×1.76
generateOutput (self)731190+111726%1.93×1.37
linkAndOptimizeIR (self)25646+62114%2.58×1.58
specializeModule20296+2766%1.79×1.32
legalizeResourceTypes5235+2305%3.57×1.84

Also growing (below top-5): legalizeExistentialTypeLayout (+229 ms, 5%), generateIR (+151 ms, 3%), SemanticChecking (+145 ms, 3%).

Near-constant (≤2% of growth each): parseTranslationUnit (2→13 ms), linkIR (2→12 ms), performMandatoryEarlyInlining (1→8 ms), performForceInlining (1→4 ms), unrollLoopsInModule (0→1 ms), frontEndExecute (self) (1→0 ms), compileInner (self) (0→0 ms).

Sweep numbers (median ms)

NcompileInnerfrontEndExecutelinkAndOptimizeIRsimplifyIR
1602356210040
320526101264110
6401427180813370
1280455136829931556