← 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.5, median ms) dynamic_dispatch 8.1× over N 50→400 0.0 262 524 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–40091.070.982604852.56×

Growth attribution (N=50 → N=400)

compileInner grows by 425 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
simplifyIR8208+20047%2.78×1.56
generateOutput (self)1062+5212%1.13×0.99
specializeModule454+5012%1.65×1.27
linkAndOptimizeIR (self)554+4811%1.29×1.14
SemanticChecking2553+297%0.47×0.42

Also growing (below top-5): legalizeExistentialTypeLayout (+17 ms, 4%), generateIR (+12 ms, 3%), legalizeResourceTypes (+10 ms, 2%).

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

Sweep numbers (median ms)

NcompileInnerspecializeModulelinkIRlinkAndOptimizeIR
50604121
100958245
200189202114
400485544351