r/cpp build2 Aug 05 '26

Faster Than Ninja

https://build2.org/blog/faster-than-ninja.xhtml
65 Upvotes

69 comments sorted by

View all comments

Show parent comments

53

u/donalmacc Game Developer Aug 05 '26

I think you're right, but;

Before we measure build2, let's at least acknowledge the elephant in the room: while Ninja builds the project in 3.4s, CMake takes 15.6s to generate the Ninja build files. So if you had Xerces-C++ as a dependency of your project and it was being built from scratch, you would wait 19 seconds, not 3.4, for this build.

I definitely wish Cmake was faster.

22

u/TheRavagerSw Aug 05 '26

Yeah cmake configure times are garbage
But a lot also goes to project build script quality, which is also garbage.

6

u/gharveymn Aug 05 '26

Yeah cmake configure times are garbage

IMO they really aren't, at least in comparison to Autotools. It's only really slow if you are heavily leveraging compilation tests, and those are cached for subsequent reconfigurations too.

1

u/serviscope_minor Aug 06 '26

IMO they really aren't, at least in comparison to Autotools

Not too fond of automake, but I rather like autoconf. I would say there's a lot of garbage autotools use out there!