Summary
This episode introduces Empty Base Optimization (EBO), a compiler technique that optimizes memory layout when inheriting from empty classes. Jason demonstrates how C++ normally requires every object to have a unique address, resulting in empty classes having a minimum size of 1 byte. He then shows how with EBO, compilers can collapse empty base classes, allowing a derived class to occupy only the space needed for its own members. The episode also highlights compiler differences, showing how GCC and Clang implement EBO more aggressively than MSVC, particularly with multiple inheritance.