← All stories
● Covered by 1 source · 1 reportLow impact1 neutral

Comparing build2 performance against Ninja for C++ project compilation

🔄 Updated 1d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Ninja is used as a performance benchmark for build systems.
  • Ninja files are generated by other tools like CMake, not written manually.
  • The comparison uses Xerces-C++, an XML parser/serializer, as a test case.
  • Ninja completed a full build of Xerces-C++ in 3.4 seconds.

Ninja as a Build System Benchmark

Ninja is often considered a performance benchmark for build systems due to its minimalist design and reliance on generated build logic. It provides minimal functionality, particularly in change tracking, compared to modern build systems.

The Challenge of Comparison

Directly comparing build systems like build2 with Ninja is difficult for complex projects. When packaging substantial projects for build2, intra-dependencies often need to be restructured, leading to different intermediate build artifacts. This makes an 'apples-to-apples' comparison challenging.

Xerces-C++ as a Test Case

To ensure a fair comparison, a simpler project was chosen where the same object files and binaries could be produced with identical compile and link options. Xerces-C++, an XML parser/serializer for C++, was selected. This project includes 299 C++ translation units linked into a shared library, making it a suitable, non-trivial test case.

Initial Ninja Performance

For a full, from-scratch build of Xerces-C++, Ninja completed the process in an average of 3.429 seconds across 10 runs. This establishes the baseline performance against which build2 will be measured.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~7 min · 6 stories · Aug 15

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Primary sources

GitHub build2/build2

Reporting from

A comparison is being conducted to see how a modern, native build system like build2 performs against Ninja, which is considered a performance benchmark for build systems. This matters for developers interested in optimizing C++ project compilation times.