Serious question: how can a build tool be fast or slow? From my understanding all it does is delegate the build steps to other tools, so wouldn't those be the bottleneck? Is it the resolution of order of build steps that takes so much time that a different build system can make a difference?
I'm afraid I still don't understand. One factor is having fewer features and not looking for obsolete files, that I can understand. I guess the other thing is using better rules to figure out when a file truly need to be rebuilt?
To be honest, it's not clear to me why other systems are not faster. Ninja is relatively straightforward but also not too clever.
Now that I think about it, I did write more about some of the performance stuff we did here: https://aosabook.org/en/posa/ninja.html Looking back over that, I guess we did do some lower-level optimization work. I think a lot of it was just coming at it from a performance mindset.
In my observations ninja more consistently uses multiple CPUs than GNU make. e. g. make -j40 will run up to 40 parallel processes (of clang/gcc) but a significant fraction of the time it will less than 40. With ninja average CPU utilization AFAIR was higher reducing build time. Not sure if it's specific to the project I was building (and how cmake generates makefiles) or would work for other projects too.