3 ms·
I can understand why tup would be faster than make for certain projects - when you have many targets and intermediates, it's more efficient to probe only the so
by KKKKkkkk1 10y ago
I can understand why tup would be faster than make for certain projects - when you have many targets and intermediates, it's more efficient to probe only the source files. But with ninja, it's not clear why would it be faster than make. I can see how a simpler file format makes processing the build faster, but ultimately ninja seems to be generating the same amount of IO as make.
- iainmerrick 10y agoIt does seem like it should be the same as make, but Ninja really is faster -- it just has close to zero cruft, whereas make is absolutely full of cruft. I use Ninja to build a medium-sized C/C++/ObjC project, around 1000 source files, and the dependency scan only takes a second or two. After that, it runs as fast as the compiler and linker are able. Edit to clarify: there might not be much speed difference for a full build, but incremental builds are much faster in Ninja.
- sriram_sun 10y agoYeah dependencies. Incremental builds are much faster. Try a make clean vs ninja clean. Ninja is a whole lot faster. I just rewrote the build scripts for a qnx makefile based system in CMake. The ninja build files brought down the build time from approximately 18 mins. to 5 mins! Incremental build time came down from 7 mins to about 30 seconds! Admittedly this was probably an extreme case where consultants got comfortable charging by the minute. Send me an email if you are interested in moving to CMake. I'll be willing to consult.