← back

interface_depth

A linear interface inheritance chain n deep (`interface I_k : I_{k-1}`) with one struct conforming to the most-derived interface (`I_n`) and one generic function constrained to the ROOT (`I0`), so satisfying the constraint walks the inheritance chain through all n levels. Scales the interface-hierarchy depth axis of calcInheritanceInfo — a different graph than generic_nesting's type-argument nesting. Scaling null: each level adds O(1) declarations, so ideal inheritance- info cost is O(n) (or O(n^2) for an all-pairs facet walk); measured ~N^3.4 when added (2026-07).

bucket: sema  ·  compile mode: module  ·  flags: (none)  ·  default N: 64

Phase composition across releases

Full sub-counter decomposition of compileInner — named leaf timers plus (self) residuals (a parent's time not covered by a named child, e.g. the autodiff transform in linkAndOptimizeIR (self)). Topmost band traces compileInner; hover a band for its phase.

Across releases

interface_depth — Across releases (median ms) interface_depth 4.66× 0.0 29 58 25.12 25.13 25.14 25.15 25.16 25.17 25.18 25.19 25.20 25.21 25.22 25.23 25.24 26.1 26.2 26.3 26.4 26.5 26.7 26.8 26.9 26.10 26.11 26.12 26.13 26.13.1 26.14 26.14.1 26.16 26.16.1 interface_depth — parseTranslationUnit interface_depth — SemanticChecking interface_depth — generateIR interface_depth — frontEndExecute (self) interface_depth — generateOutput (self) interface_depth — compileInner (self) phase buckets parseTranslationUnit SemanticChecking generateIR frontEndExecute (self) specializeModule simplifyIR linkIR unrollLoopsInModule legalizeResourceTypes legalizeExistentialTypeLayout performMandatoryEarlyInlining performForceInlining linkAndOptimizeIR (self) emitEntryPointsSourceFromIR generateOutput (self) compileInner (self)

Daily tip-of-tree (last 30 days)

interface_depth — Daily tip-of-tree (last 30 days) (median ms) interface_depth 1.00× 0.0 26 53 07-30 07-31 08-01 08-02 08-03 08-04 08-05 08-06 08-07 08-08 08-09 08-10 08-11 08-12 08-13 08-14 08-15 08-15 08-18 08-19 08-20 08-21 08-22 08-23 08-24 08-25 08-26 08-27 08-28 08-29 interface_depth — parseTranslationUnit interface_depth — SemanticChecking interface_depth — generateIR interface_depth — frontEndExecute (self) interface_depth — generateOutput (self) interface_depth — compileInner (self) phase buckets parseTranslationUnit SemanticChecking generateIR frontEndExecute (self) specializeModule simplifyIR linkIR unrollLoopsInModule legalizeResourceTypes legalizeExistentialTypeLayout performMandatoryEarlyInlining performForceInlining linkAndOptimizeIR (self) emitEntryPointsSourceFromIR generateOutput (self) compileInner (self)

Daily window progress

Overall compileInner: 47.7 → 47.9 ms  +0.4%  (2026-07-30 7c58a326b → 2026-08-29 28c755b09)

Contributors — the mutually-exclusive phase buckets (named leaves + (self) residuals) that tile compileInner; the pp column sums to the overall %. Buckets moving the total by ≥0.2% are listed, the rest fold into the remainder row. Below them, every other reported counter (nested/overlapping, e.g. serialized-module reads — own change only):

counterΔown %of total
frontEndExecute (self)+0.2 ms+201.2%+0.5pp
(remaining 5 buckets)-0.1 ms-0.1pp
writeSerializedModuleAST+0.0 ms+5.4%

Largest day steps (≥5% of the previous day, both directions; bisect with git log <c0>..<c1> -- source/):

boundary% vs prev daycommitstop buckets (own %)
none

Reproduce

Run from the slang repo root. This regenerates the sources below and re-runs this workload's measurement; --gen-dir keeps the generated files (they go to a tempdir and are deleted otherwise).

python3 tools/compile-perf/bench.py --slangc /path/to/slangc --only interface_depth --label repro --gen-dir repro-interface_depth

Compiled Slang source

the complete compiled source (N = 64), shown in full

interface_depth.slang (76 lines)

// AUTO-GENERATED by perf-suite/workloads.py - do not edit by hand.
interface I0 { float get(); }
interface I1 : I0 { }
interface I2 : I1 { }
interface I3 : I2 { }
interface I4 : I3 { }
interface I5 : I4 { }
interface I6 : I5 { }
interface I7 : I6 { }
interface I8 : I7 { }
interface I9 : I8 { }
interface I10 : I9 { }
interface I11 : I10 { }
interface I12 : I11 { }
interface I13 : I12 { }
interface I14 : I13 { }
interface I15 : I14 { }
interface I16 : I15 { }
interface I17 : I16 { }
interface I18 : I17 { }
interface I19 : I18 { }
interface I20 : I19 { }
interface I21 : I20 { }
interface I22 : I21 { }
interface I23 : I22 { }
interface I24 : I23 { }
interface I25 : I24 { }
interface I26 : I25 { }
interface I27 : I26 { }
interface I28 : I27 { }
interface I29 : I28 { }
interface I30 : I29 { }
interface I31 : I30 { }
interface I32 : I31 { }
interface I33 : I32 { }
interface I34 : I33 { }
interface I35 : I34 { }
interface I36 : I35 { }
interface I37 : I36 { }
interface I38 : I37 { }
interface I39 : I38 { }
interface I40 : I39 { }
interface I41 : I40 { }
interface I42 : I41 { }
interface I43 : I42 { }
interface I44 : I43 { }
interface I45 : I44 { }
interface I46 : I45 { }
interface I47 : I46 { }
interface I48 : I47 { }
interface I49 : I48 { }
interface I50 : I49 { }
interface I51 : I50 { }
interface I52 : I51 { }
interface I53 : I52 { }
interface I54 : I53 { }
interface I55 : I54 { }
interface I56 : I55 { }
interface I57 : I56 { }
interface I58 : I57 { }
interface I59 : I58 { }
interface I60 : I59 { }
interface I61 : I60 { }
interface I62 : I61 { }
interface I63 : I62 { }
interface I64 : I63 { }

struct S : I64 { float get() { return 1.0; } }

float use<T : I0>(T t) { return t.get(); }

RWStructuredBuffer<float> outBuf;

[shader("compute")]
[numthreads(1, 1, 1)]
void computeMain() { S s; outBuf[0] = use(s); }