5 ms·
C++ compilation is massively slowed down by the sheer existence of the preprocessor. This could be drastically improved by the usage of modules which are coming
by intea 8y ago
C++ compilation is massively slowed down by the sheer existence of the preprocessor. This could be drastically improved by the usage of modules which are coming soon(tm).
Both MSVC and Clang already support them experimentally fwiw.
- Koshkin 8y agoTo be fair, what slows down compilation is not "the sheer existence" but the extensive use of large and complex #include files.
- geezerjay 8y agoIndeed. IIRC this topic is covered directly in Meyers' "Effective C++" book, including the trick to use pointers + forward declarations in headers to avoid including other headers.