Back To Schedule

From Graph to Groove

A constexpr Optimizing Compiler for DSP Graphs

00:00 - 00:00 UTC | Monday 9th November 2026 |
Intermediate
Advanced

As an audio developer we often have to make a choice. Either we hand-roll tight DSP loops that run fast but do not compose well, or we reach for external code generators like FAUST, complicating our build and debugging experience. Alternatively there is a variety of template metaprogramming based solutions. We all love templates, but honestly, when something goes wrong we're left reading multi-page type names and cryptic compiler errors. And since everything lives in the type system, the things it can do are rather limited.

It's 2026 and most compilers support C++23, and with its extended constexpr capabilities this allows us to take a fundamentally different route, which will be presented in this talk: we can implement a full optimizing compiler for DSP graphs that runs entirely at compile-time. A meta-compiler so to speak, living entirely in standard C++. And because everything - the DSL, the IR, the passes, the scheduler - is plain `constexpr` code, is just data and ordinary functions, we can debug the compiler and the optimizer like every normal C++ program. We can unit-test the compiler and - vice versa - we can static-assert the DSP graph is correct.

Once the schedule is finished we lift it into the type system exactly once, and what ships is inlined, allocation-free, vectorized code.

And since we own the compiler, we can do optimizations that even `-O3` can't. A compile-time cost model that knows your target's cache sizes, SIMD width etc. reschedules the same graph for different architectures and targets. It allows the auto-scheduler to emit optimized loop nests, or to reshape the data or even parallelize it if the expected gains will outweigh the overhead. The resulting schedules match idiomatic JUCE, KFR or FAUST or run often even significantly faster by fusing and vectorizing across the whole graph rather than node by node.

The opportunities it unlocks are vast: from imposing restrictions on buffer sizes that unlock specific optimizations, automatic differentiation, physical units that propagate through the graph, domain-based safety checks to name a few.

Gerald Golka

Gerald Golka is a Vienna-based senior software developer, startup founder, and AI researcher with almost two decades of experience in software engineering and research in the realm of music and audio. He holds a Master of Music degree with a focus on classical flute and music theory, bridging domain knowledge in music structure and acoustics with advanced software design. He is a co-founder of two music technology startups and has architected key software systems and provided technical consulting for industry-leading organizations, including the Vienna Symphonic Library and Muse Group. Driven by a deep interest in AI/ML, digital signal processing, and symbolic music representation, he is a dedicated C++ metaprogramming geek specializing in high-performance compile-time architectures.