Are you an EPFL student looking for a semester project?
Work with us on data science and visualisation projects, and deploy your project as an app on top of Graph Search.
This lecture discusses the object layout problem in object-oriented languages, focusing on single inheritance scenarios. It explains how fields of objects are arranged in memory for efficient access, especially in Java-like languages. The lecture covers the challenges posed by inclusion polymorphism, the layout of fields in subclasses, and the use of virtual methods tables (VMTs) for method dispatch. It also explores bidirectional layouts, accessor methods, and the trade-offs between space and speed in multiple inheritance settings. Additionally, it delves into the concepts of inline caching, polymorphic inline caching, and membership test techniques like relative numbering and Cohen's encoding.