← 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.12, median ms) dynamic_dispatch 16.0× over N 50→400 0.0 532 1063 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–400141.450.994619853.16×

Growth attribution (N=50 → N=400)

compileInner grows by 923 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
specializeModule15612+59765%3.64×1.81
simplifyIR8170+16117%2.25×1.46
linkAndOptimizeIR (self)665+596%1.49×1.21
generateOutput (self)962+536%1.18×1.07
SemanticChecking1434+212%0.68×0.64

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

Sweep numbers (median ms)

NcompileInnerspecializeModulelinkIRlinkAndOptimizeIR
506115133
10012446283
2003111642249
4009856124866