← 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.5, median ms) existential_aggregate 9.7× over N 50→400 0.0 336 672 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–40091.160.988646222.56×

Growth attribution (N=50 → N=400)

compileInner grows by 558 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
simplifyIR9223+21438%2.48×1.55
specializeModule6156+15027%2.82×1.60
generateOutput (self)964+5510%1.14×1.06
linkAndOptimizeIR (self)658+529%1.31×1.14
SemanticChecking2653+275%0.46×0.40

Also growing (below top-5): generateIR (+25 ms, 5%), legalizeExistentialTypeLayout (+17 ms, 3%).

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

Sweep numbers (median ms)

NcompileInnerspecializeModulelegalizeExistentialTypeLayoutsimplifyIR
5064619
10010814224
20024345673
40062215618223