Про модули
От: LaptevVV Россия  
Дата: 03.09.25 05:18
Оценка:
https://chuanqixu9.github.io/c++/2025/08/14/C++20-Modules.en.html

Build System
How much compile time can C++20 Modules save?
Are C++20 Modules and PCH equivalent? What’s the difference?
Can C++20 Modules reduce code size? Why?
Can we use C++20 Modules for programming now?
But what’s the cost?
When to use C++20 Modules
Modules Wrapper
export-using style
extern “C++” style
Choose a specific suffix for your wrapped third-party libraries to avoid conflicts
One big thirdparty module
Use .cppm and other special suffixes as the filename suffix for importable module units
How do C++20 Modules reduce compile time?
Frontend and Compile-Time Computation
Mid-end and Back-end
Negative impacts of Modules on compile speed
Recompilation issues from modifying interface files
Other uses for Module Implementation Partition Units
Non-Cascading Changes
Try to avoid placing the same declaration in different TUs
Mixing import and #include
Impact of Modules on code size
Runtime issues encountered during module migration
Forward declaration issues in Modules
TODO?

Хочешь быть счастливым — будь им!
Без булдырабыз!!!
Re: Про модули
От: Doom100500 Израиль  
Дата: 03.09.25 08:29
Оценка:
Здравствуйте, LaptevVV, Вы писали:

LVV>https://chuanqixu9.github.io/c++/2025/08/14/C++20-Modules.en.html


I have written some small examples with CMake with C++20 Modules, but I haven’t used it seriously


Вот. Это. Где конкретные применения на живом проекте. Как фотки во всяких салонах красоты, чтобы было "До" и "После".

Я тоже с модулями игрался (довольно давно уже) и видел подобные примеры. А воз и ныне там.
Спасибо за внимание
Re: Про модули
От: Doom100500 Израиль  
Дата: 03.09.25 08:36
Оценка:
Здравствуйте, LaptevVV, Вы писали:

LVV>https://chuanqixu9.github.io/c++/2025/08/14/C++20-Modules.en.html


Вот ещё.

Выглядит как какая-то фанатская секта с враньём на каждом шагу.

How much compile time can C++20 Modules save?
The data I have obtained from practice ranges from 25% to 45%, excluding the build time of third-party libraries, including the standard library.


Negative impacts of Modules on compile speed
The introduction of Modules adds extra serialization and deserialization overhead to the compilation process. The serialization and deserialization overheads are expected to be relatively low, especially the deserialization overhead. If you find that the compiler’s deserialization or serialization overhead is too high, it might be a compiler defect.

Спасибо за внимание
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.