Is there something in the ninja language that makes it faster than make?

In short, Ninja parses faster, and has built-in features that reduce the amount to parse.

From the philosophical overview in the ninja manual:

Where other build systems are high-level languages, Ninja aims to be an assembler.

Ninja files are often “compiled” from other makefiles, making it a two-step process whereas Make is a single step. The two-step can be slower than plain Make. Because only the second step is necessary for most the time the net effect is it being faster. It’s somewhat similar to comparing a compiled and interpreted program.

Ninja add several features to Make. Implementing these in a makefile lead to longer, more complicated makefiles and thus much more parsing.

Leave a Comment

tech