Back To Schedule

A Deep Dive Into Dispatching Techniques

11:00 - 12:30 Friday 12th May 2023 MT Bethe Hall
Advanced
Performance

At the core of an interpreter is a loop that iterates over instructions and executes them in order.
This requires dispatching: based on the current instruction it needs to select different code.
A fast interpreter requires a fast instruction dispatcher, but so does everything else that needs to switch over a fixed set of different options.

This talk investigates at various dispatching techniques, from simple switch statements to jump tables.
We'll look at performance analysis tools, benchmarks, and lots and lots of assembly code, in order to learn ways to trick the compiler into generating the assembly code that we actually want.

Even if you don't need to actually write an interpreter or other dispatcher, you will learn a lot about optimization.

View Slides

Jonathan Müller

Software EngineerLSEG

Jonathan is a Software Engineer at LSEG. There he develops low-latency market data feed handlers in C++ for high-frequency trading applications. Previously, he maintained think-cell’s core C++ libraries built around a custom range implementation.

He is also the chair of the std::ranges study group in the C++ standardization committee, a frequent speaker at conferences and universities, and the author of multiple open-source C++ libraries.