← all workloads

dynamic_dispatch

One interface, n implementations, called through an existential whose concrete type is chosen at runtime (defeats static specialization, forcing witness-table dynamic dispatch). Stresses dispatch lowering / specializeModule. Scaling null: n scales implementations and switch cases; generated code is O(n), so ideal cost is O(n).

bucket: dynamic_dispatch  ·  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.

dynamic_dispatch — phase composition vs N (v2026.13.1, median ms) dynamic_dispatch 6.0× over N 50→400 0.0 159 317 50 100 200 400 N dynamic_dispatch — parseTranslationUnit dynamic_dispatch — SemanticChecking dynamic_dispatch — generateIR dynamic_dispatch — frontEndExecute (self) dynamic_dispatch — specializeModule dynamic_dispatch — simplifyIR dynamic_dispatch — linkIR dynamic_dispatch — unrollLoopsInModule dynamic_dispatch — legalizeResourceTypes dynamic_dispatch — legalizeExistentialTypeLayout dynamic_dispatch — performMandatoryEarlyInlining dynamic_dispatch — performForceInlining dynamic_dispatch — linkAndOptimizeIR (self) dynamic_dispatch — generateOutput (self) dynamic_dispatch — 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×
50–400110.960.996492942.06×

Growth attribution (N=50 → N=400)

compileInner grows by 244 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=50t@N=400Δ msshare× lin∝Nk
specializeModule775+6828%1.43×1.16
generateOutput (self)954+4518%1.07×1.00
simplifyIR649+4317%1.01×0.99
linkAndOptimizeIR (self)642+3615%1.01×0.99
SemanticChecking1334+219%0.69×0.66

Also growing (below top-5): generateIR (+13 ms, 5%), legalizeExistentialTypeLayout (+5 ms, 2%).

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

Sweep numbers (median ms)

NcompileInnerspecializeModulelinkIRlinkAndOptimizeIR
50497122
1007913141
20014229282
400294753184