Implementing C++ Modules: Lessons Learned, Lessons Abandoned
summary
Implementation report gives concrete claims and working fixes: MSVC adds a persistent translation unit (IFC) on disk, linkers record strong module ownership so identically mangled names live in module buckets, and header-include vs module benchmarks show big wins — about 5× for header-units, 17.5× for importing std, up to 66.5× comparing all headers, and front-end optimizations drop a sample import from ~6s to 1.8s. Built features work; avoid relying on PCHs, prefer named modules and IFC-based tooling.
AI-written summary · about
chapters (14)
- 0:00Start
- 1:27What Were the Modules Designed for
- 9:02Module Ownership
- 12:37Strong Module Ownership
- 15:03Odr Check
- 16:22Persistent Translation Unit
- 18:35External Linkage Symbols
- 19:30The Linker Map
- 24:57Header Units
- 31:15Named Modules
- 34:42Template Specializations
- 37:21Optimization Using Right Data Structures
- 40:57Partial Specializations
- 51:51Parsing C plus Plus Code
related talks
01h 08mC++20 Modules, 5 Years Later
01h 08mA Short Tour of C++ Modules - Modules Demystified and Applied
01h 05mModules are coming
01h 07mC++20 Modules: The Packaging and Binary Redistribution Story
44mCompilation Speedup Using C++ Modules: A Case Study
05mC++ Modules and Packages: Making Dreams Come True
01h 03mUnlocking the value of C++20
01h 31mISO C++ Standards Committee Panel Discussion
