4 ms·
So, roughly speaking, you can expect for a difference in the order of tens of seconds. But my question was, how relevant is this? At least in my experience, and
by cLeEOGPw 11y ago
So, roughly speaking, you can expect for a difference in the order of tens of seconds. But my question was, how relevant is this? At least in my experience, and I have worked with projects that took up to 50 minutes to fully recompile (before we moved to newer ms compiler) when taking all dlls, the full recompilation is rarely required. Sometimes you have to recompile project, which can take minute or so, but most often you do incremental compilations that barely takes a second. So for me it's hard to imagine compile time having considerable impact on delivery. Most of the time is used while reading the code and thinking how to solve a problem, not typing the keyboard and waiting for compilation to finish. And I would argue that properly written C++ can greatly improve the biggest part of work - reading and understanding the code. I admit that properly written code is not a given etc., but for personal project you can write however you want. In the end it's probably more personal prefference and how confortable you feel rather than strict rational choice. I think both C and C++ are very close calls, especially considering all the other choices there are.
- dottrap 11y agoAs for understandability, I used to work with a lot of EE people building various equipment that required both hardware/software. Everybody was smart, but not necessarily an expert in programming. We also used various programming languages. The rule was keep all code at an "8th grade level" and write everything like C. Everybody regardless of language background can read C. C has become the universal pseudo-code. Nobody agrees on what "properly written C++" is. A colleague with a C++98 background told me C++11 looks like a completely foreign language to him.
- loup-vaillant 11y agoSorry, I didn't make myself clear. My bad. By "recompilation", I actually meant incremental compilation. I have yet to see a C++ project in my day job that takes less than 10 seconds. Not a deal breaker, but kinda flow-disrupting. As for full re-compilation, I have known one C++ project that took less than 5 minutes. The rest always took more than 10 minutes.