Back To Schedule

Zero-Cost Abstractions in Large Systems

Lessons from OpenJDK’s Barrier Refactoring

14:30 - 15:30 Wednesday 11th March 2026 UTC
Intermediate
Advanced
Design

Large C++ systems—virtual machines, databases, rendering engines, compilers—must balance flexibility with extreme performance. OpenJDK offers a practical example: its memory-access barriers must adapt to the active garbage collector at runtime, yet remain efficient on the hottest paths of the VM. Earlier imperative designs made these components increasingly difficult to scale and maintain as the codebase expanded.

This talk explores how OpenJDK refactored its barriers into a declarative, template-driven architecture that preserves runtime pluggability while achieving zero-overhead abstraction. Instead of imperative hierarchies, barriers now express their behavior through declarative access semantics and composable semantic properties, with the compiler synthesizing the optimized implementation.

Attendees will learn how to combine runtime pluggability with compile-time composition, how declarative semantics simplify large C++ systems, when traditional runtime polymorphism stops scaling, and how template-driven design enables modular, maintainable, and high-performance subsystems. The ideas apply broadly across demanding C++ domains, independent of JVM internals.

View Slides

Shubhankar Gambhir

SDE 2AZUL SYSTEMS

Shubhankar Gambhir is a software engineer at Azul Systems, where he works on the efficiency, warmup  and has previously contributed to the GC stack. His work focuses on systems performance, runtime behaviour, and the design of high-efficiency mechanisms within large virtual machine architectures. He frequently builds focused C++ prototypes to explore design trade-offs, validate optimizations, and simplify the behaviour of complex subsystems. His interests span computer architecture, concurrency, and runtime engineering.

VolumetricCondensed