4 ms·
> There is one real problem with "modern" C++ that I would have hoped they would focus on: Compile times. I found a really simple solution to this: disable all
by babuskov 10y ago
> There is one real problem with "modern" C++ that I would have hoped they would focus on: Compile times.
I found a really simple solution to this: disable all optimizations while you are developing and only use them for production build. I have 70k LOC project that compiles from scratch in 10-11 seconds (using 8 parallel builds).
Regular changes to 2-3 .cpp files and link are done in 1-2 seconds.
This is esp. important with MSVC which has a huge difference between non-optimized and optimized build.
Also, use precompiled headers.
- RBO2 10y agoAlso I use ccache on all my projects. Rebuilds times are now at 10s for a 50 kloc project.
- mikepurvis 10y agoSure, but in a "modern" codebase where you're template-everything, then more changes will be in headers, resulting in a lot more translation units being affected by any given change.
- user5994461 10y agoThere are issues which may arise because of the optimizations. Need to have them in a staging build.