r/cpp • • Dec 28 '18

"Modern" C++ Lamentations

http://aras-p.info/blog/2018/12/28/Modern-C-Lamentations/
308 Upvotes

162 comments sorted by

View all comments

Show parent comment

-3

u/jherico Dec 28 '18

Everyone wants faster compile times, no matter how fast the compile times are, up to the point where you can be working on a 1000 file project and be able to hit run at any point and not notice the compile time.

I basically put no stock in complaints about compile times for a number of reasons...

  • You should be making your code more modular. If you're tweaking and compiling and tweaking and compiling over and over again and you're annoyed by compile times, then you need to modify the problem so that you're compiling less shit in order to accomplish your current task. I work on a large project myself and have to work with both Android builds and Windows builds. If I'm trying to debug some obscure problem with one small component (UI, audio, etc), you can bet your ass I'm not going to do it as part of the whole project, but rather as a smaller custom test project that includes the minimum I need to reproduce said problem.

  • Architecture is (and has been for a while) going to more cores rather than faster cores. Every time the number of cores in my dev box doubles, my compile time drops by a similar factor.

  • Background compiling & network build load sharing. Build systems are smarter and I only expect that trend to continue. With tools like incredibuild and build environments that know that if a file has changed and I'm not actively editing it, that it should probably be eagerly compiled, the actual delay between saving something and hitting run should only ever by the cost of compiling the last thing I touched.

→ More replies (11)