Thursday, 4 May 2017

Compiler investigations

As an impatient programmer, I've always been interested in compile times. I believe that fast-iteration is something that makes a huge difference to my level of productivity. I guess we all have different work-flows and adapt to those, too. So I've been playing around with my relatively small-but-perfectly-formed WeaselTech codebase. It's relatively simple and handles modelviewing, sound, input, file loading, etc. Most of the stuff you typically need to build a game with.

Firstly, I don't consider the compile times to be onerous for this project - I actively maintain it to do The Good Things - but it's a reasonable enough size project and I'm curious about how much of the many things I've been told about compile times are true. Also I'm interested in decisions made in future projects.

tl;dr I managed to get my compile times down from around 13.1 seconds to 2.1s. That's 84% faster! If you're too lazy - or have better things to do - There's a convenient summary at the bottom of the page.