Hi, Ninja is being mentioned more and more frequently on this list, but I don't think anybody has introduced it formally. Ninja is, briefly put, a super-fast replacement for GNU Make, nmake, and all the other make tools out there. For those of you who are a bit reluctant to waste time on Ninja or don't know what it is, I can strongly urge you to download it from http://sourceforge.net/projects/cmakescript/files/ together with a Ninja-enabled version of CMake from the same URL. It takes you perhaps 5 minutes, and you are going to earn them back hundreds and thousands of times over the coming years. My Clang build used to take 59:29 minutes using MinGW Makefiles. With Ninja, it takes 18:43 minutes! That's a speed up of factor three. Cheers, Mikael -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120618/71f3207e/attachment.html>
Hi Mikael,> My Clang build used to take 59:29 minutes using MinGW Makefiles. With > Ninja, it takes 18:43 minutes! That's a speed up of factor three.sorry for asking the obvious question: Are you comparing against a parallel "make -j<n>"? :-) Best regards, Christoph
Hi Christoph, It is a good question even though it is obvious :-) No, for the last few days, I have not been able to build Clang with make -j2 or -j4 - the build always fails on a ranlib operation. Also, on Windows, GNU Make seems to be somewhat broken with respect to parallel builds: It doesn't change a thing whether you specify -j2 or -j4 on a quad-core machine (with hyper-threading disabled in BIOS): The load never passes 50 percent. I have searched the net and found various magic recipes for how to fix the problem, but none of them worked. Perhaps somebody with a make-friendly platform (Linux, Solaris, etc.) will post their numbers with "make -j6" versus "ninja" (Ninja defaults to six threads). All I can say is that for Windows users, Ninja is the best news in years. And I have seen Mac owners report a speed-up of 2.5 times. So I don't think it is only on Windows it is a win-win situation. Supposedly, Ninja is built for speed. I am myself VERY surprised that there were so large gains to be had just from switching out your make tool with ninja. And by the way, you invoke ninja just like make: "ninja", "ninja check", "ninja install", and so on. Best regards, Mikael 2012/6/18 Christoph Erhardt <christoph at sicherha.de>> Hi Mikael, > > > My Clang build used to take 59:29 minutes using MinGW Makefiles. With > > Ninja, it takes 18:43 minutes! That's a speed up of factor three. > sorry for asking the obvious question: Are you comparing against a > parallel "make -j<n>"? :-) > > Best regards, > Christoph > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120618/d0ff91c1/attachment.html>
Christoph Erhardt <christoph at sicherha.de> writes:> Hi Mikael, > >> My Clang build used to take 59:29 minutes using MinGW Makefiles. With >> Ninja, it takes 18:43 minutes! That's a speed up of factor three. > sorry for asking the obvious question: Are you comparing against a > parallel "make -j<n>"? :-)I'm pretty sure he isn't. Building Clang+LLVM with MinGW, maybe ninja is faster than gmake by a few dozen seconds on Windows. The real advantage is over the build tools traditionally used with the Visual Studio toolchain, because all of have limited support for parallelization. The other aspect where ninja shines over all other build tools is at being fast parsing the makefiles and determining what needs to be rebuilt. This is something people appreciate while rebuilding big projects after small changes. BTW Mikael, have you checked http://llvm.org/docs/CMake.html ?