← all workloads

existential_aggregate

An interface-typed *field* inside a struct (`Scene { IMat m; ... }`), with n implementations selected at runtime through a switch. Unlike `dynamic_dispatch` (a bare local existential), boxing the existential in an aggregate forces `legalizeExistentialTypeLayout` to float the existential field out and recompute the parent layout, and feeds specializeModule a witness-table-per-case blowup. Stresses specializeModule + legalizeExistentialTypeLayout + the downstream simplifyIR. Scales by breadth (number of implementations / switch cases). Scaling null: n scales cases, each an O(1) body; ideal specialization 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.

existential_aggregate — phase composition vs N (v2026.13, median ms) existential_aggregate 9.1× over N 50→400 0.0 263 526 50 100 200 400 N existential_aggregate — parseTranslationUnit existential_aggregate — SemanticChecking existential_aggregate — generateIR existential_aggregate — frontEndExecute (self) existential_aggregate — specializeModule existential_aggregate — simplifyIR existential_aggregate — linkIR existential_aggregate — unrollLoopsInModule existential_aggregate — legalizeResourceTypes existential_aggregate — legalizeExistentialTypeLayout existential_aggregate — performMandatoryEarlyInlining existential_aggregate — performForceInlining existential_aggregate — linkAndOptimizeIR (self) existential_aggregate — generateOutput (self) existential_aggregate — 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–400101.160.993534872.48×

Growth attribution (N=50 → N=400)

compileInner grows by 433 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
specializeModule9219+21048%2.54×1.53
simplifyIR773+6615%1.34×1.14
generateOutput (self)956+4811%1.06×1.01
linkAndOptimizeIR (self)647+419%1.08×1.03
generateIR632+266%1.07×0.93

Also growing (below top-5): SemanticChecking (+22 ms, 5%).

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

Sweep numbers (median ms)

NcompileInnerspecializeModulelegalizeExistentialTypeLayoutsimplifyIR
5053917
1009222214
20019766431
400487219873