4 ms·
It doesn't matter much when you build only once, but more people need to be aware of Ninja for builds. Both cmake and meson can target it, and it is much faster
by atq2119 8y ago
It doesn't matter much when you build only once, but more people need to be aware of Ninja for builds. Both cmake and meson can target it, and it is much faster for incremental builds.
- RantyDave 8y agoI never understand this. Surely 'make' itself uses an almost irrelevantly low amount of CPU compared to compiling? That being said: have used Ninja with Cmake. Damn fast.
- maccam912 8y agoIt's not so much how much CPU each takes up, but that 'make' will waste some time recompiling stuff that doesn't need to be recompiled. Ninja is better about reusing stuff compiled the first time to make the second compilation faster but still accurate.
- coherentpony 8y agoIsn't the point of `make` that it doesn't build stuff that doesn't need to be rebuilt? Am I missing something?
- swuecho 8y agoI guess make and ninjia use different algorithm to compute the targets that does not beed to rebuild.
- atq2119 8y agoThe problem is with how make checks which files have changed and the related I/O latency, plus the fact that pretty much everybody uses recursive make. The overhead of recursive make initialization plus the forced serialisation of builds is the main cause of slow make. Consider the Linux kernel as a contrast, which doesn't suffer from slow make because a lot of investment was made into a non-recursive make system. The fact that makefile generators like CMake tend to generate recursive makefiles is a shame.