Skip to content
0:00 / 0:00

#dispatching#interpreters#virtualfunctions

[normalized Sound] A deep dive into dispatching techniques - Jonathan Müller - Meeting C++ 2022

Meeting Cpp

38K subscribers • 32 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Jonathan Müller, C++ developer

Advanced. Deep dive for people who know the field.

2.8K views3 years ago2 recommendations

Systems programmingProgramming languagesC++Compilers and interpretersPerformance and optimization

Jonathan Müller explores various instruction dispatching techniques for interpreters, analyzing performance from virtual functions to jump tables.

A deep dive into dispatching techniques - Jonathan Müller - Meeting C++ 2022 Slides: slides.meetingcpp.com Survey: survey.meetingcpp.com 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 virtual functions over 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.

Why it's here

2 people recommend this

What people say. Recommended for optimizing bytecode interpreters and understanding high-performance VM dispatching.

u/aneax7in r/ProgrammingLanguages • Recommends

On “Is it possible to optimize this bytecode interpreter more?”

This talk might be interesting to you. A deep dive into dispatching techniques. link to this video

u/ventuspilotin r/ProgrammingLanguages • Recommends

On “Resources for creating a high performance VM”

Maybe you will find A deep dive into dispatching techniques - Jonathan Müller - Meeting C++ 2022 interesting, and/ or Building the fastest Lua interpreter.. automatically!. Lua is considered to be fast and somewhere on Reddit Lua's author discussed tricks he used unfortunately I can't find it right now.