5 ms·
Anything that is part of the programming routine should be severely optimized. Every little bit not only adds up, it often multiplies in big enough projects.
by Deestan 17y ago
Anything that is part of the programming routine should be severely optimized.
Every little bit not only adds up, it often multiplies in big enough projects.
In one of our big products, we have several build steps that touch upon the source control systems. 10 second VCS delay X 6 build steps, 1 second lazily written c++-header slowdown X 300 files, etc. and before you know it something that should take 10-15 minutes for a clean build now takes ~1 hour. True story. :(
Luckily, enough of us got so annoyed about this that it got fixed after a few weeks of dedicated effort. We now have a constant conscious effort to keep build times down.
- berntb 17y agoThank you for reminding me about compilation time. Now I won't be tempted to go back from scripting language country for a few more years... :-) Edit: I should add that I have very fond memories about my youth and C, too.
- ido 17y agoC++ compiles much slower than many other popular compiled languages, and the more of its "fancy" features you use the slower it compiles. C & Java for example both compile much faster than c++.
- mrkurt 17y agoMost sane projects I've experienced do "builds" even with scripting languages. It's every bit as much of an annoyance to have a bunch of needlessly slow tests as it is to deal with slow compile times.
- berntb 17y agoOK, a point; the pain with compiling languages is the compile cycle where you edit-and-run just local tests, not for the whole system.
- gvb 17y agoAs Deestan notes, delays have direct multipliers. Beyond that, delays often have indirect multipliers that are even worse. XKCD "Compiling" http://xkcd.com/303/ http://xkcd.com/303/ is funny because we have all done it. If there is a noticeable lag in a development step (VCS operations, compiling, running the program, etc.), it is very likely that the developer will lose concentration and switch to reading email, browsing HN, reading /., BSing with co-workers, etc. This takes the direct delays and turns them into exponential multipliers. The result is that 30 seconds of lag has a high risk of becoming 30 minutes of wasted time.