3 ms·
"A C++ compiler will take longer than a C compiler to produce the same code from some C source code" While this is technically true, I have in the past measure
by CJefferson 13y ago
"A C++ compiler will take longer than a C compiler to produce the same code from some C source code"
While this is technically true, I have in the past measured this, and the difference on my code when optimising was < 5%, so I think nothing to worry about.
- eliasmacpherson 13y agoBasically if you had to get a distro out the door, and 100 days to do it, given your example, if the code was written in C with a C compiler, you'd be done 5% quicker. It's not the sort of thing you can measure once and just forget about. Then of course by moving to a C++ compiler, the temptation is to use features that take forever to compile!
- eliasmacpherson 13y agoThis isn't really relevant to your point or to the discussion, but this is not the first time I've heard of these kinds of improvements in compile time: http://tech.slashdot.org/comments.pl?sid=4410261&cid=45332543 http://tech.slashdot.org/comments.pl?sid=4410261&cid=4533254... Obviously, what's being compiled is not exactly equivalent but the time difference is startling.