Emacs internals: Tagged pointers vs. C++ std:variant and LLVM (Part 3)
Summary
The article explores how Emacs represents dynamic Lisp data in a 64-bit word using a 3-bit tag, compares tagged unions (unboxed) with tagged pointers (boxed), and introduces Poor Man's Inheritance via struct embedding to extend type space. It also draws a parallel to LLVM's Custom RTTI approach and surveys other uses of tagged pointers in systems tech, concluding with implications for memory layout and performance.