3 ms·
Have you ever worked at a place where builds can take multiple days? If not, don't speak so hastily about compiler speed not being important. Slow compilation
by com2kid 7y ago
Have you ever worked at a place where builds can take multiple days?
If not, don't speak so hastily about compiler speed not being important.
Slow compilations means work arounds like batching changes together for tests on commits, which means doing binary searches across commits to find out who broke the tests, or just reverting everyone's commit and telling people to resubmit and hope it goes through next time.
Ever waited a week trying to get a single change committed because you kept getting batched with other people's broken code?
Slow compilation times matter, a lot. C++ is the nightmare case scenario for this, I've seen templates that take 10 minutes to compile, and once a team gets sizable, build queues became a thing, and they slow development to a crawl.
A 100x slower compiler has a huge impact on productivity. Copy and pasting code for those instances where you need to use template/generic programming is a huge win over waiting days for any and all changes to compile.
FWIW typically in these situations local rebuilds are faster, from 10 - 30 minutes in my experience, but I've only had the pleasure of working on code bases of such size twice, so who knows how bad it can get.
- hinkley 7y agoThe way I like to describe it from a systems or operations perspective is this: Slow (or flaky) build processes create gamblers. You don't want people gambling with prod. When it's expensive (time or attention) to verify your work, people start lying to themselves. They tell themselves they've done enough, or that red test or wrong data on the screen is "just a glitch", and you know they do this because when they get caught breaking stuff they will tell you the same thing they told themselves. The progression that works is this: You make the tool. You make the tool reliable. You make the tool straightforward. You make the tool cheap. You make the tool mandatory. People keep skipping step 4 and thinking rhetoric (even verbal abuse) will save them. If you meet idiots all day...
- davnicwil 7y agoWhat types of software and systems have you worked with that take on the order of days to compile?
- com2kid 7y ago1. Windows Mobile. 2. Microsoft Office. Windows Mobile was pre-ssd, but we were surprised when we did get the first generation of SSDs and they weren't an order of magnitude reduction in compile times. (They helped but not as much as we hoped for!)
- kasey_junk 7y agoDay long compiles used to be routine. Any c++ project in 2001 had a good chance of taking that long. I worked on a c# project in 2011 that had 18 hour builds.
- dilyevsky 7y agoI worked for telecom company and our codebase for embedded board with maaaybe 500k LOC of c/c++ (no tmp or any of that crap) took like 4+ hours. That was 2007ish. Didn’t help that our build machines were Sun garbage boxes
- alexhutcheson 7y agoYou also end up writing patterns like Pimpl[1] into your codebase, which are really just contortions to get faster compilation speed at the expense of readability, maintainability, and (some) runtime speed. [1] https://herbsutter.com/gotw/_100/ https://herbsutter.com/gotw/_100/
- zbentley 7y ago> A 100x slower compiler has a huge impact on productivity Very true, but the article didn't mention a 100x slower compiler, they mentioned 100% (2x) slower one. Technically that's a quantitative difference of degree, but it's so big as to be talking about qualitatively different developer experiences.
- com2kid 7y agoTrue, although the poster I was replying to mentioned 100x. Even at 2x, you can only 2x compile times so many times until things get unmanageable!
- apta 7y agoOther than C++, and perhaps Rust, all major industry languages compile fairly quickly. As far as I'm aware, this discussion is moot.
- pjmlp 7y agoAll the way back to 16 bit home micros days.