I often see the claim made that Ninja is faster than Make, is better at supporting incremental builds, and better at parallelization. Is this a quality of implementation issue or is there something in the Ninja language that enables this?
I understand that Ninja and Make use different file formats to describe the dependency graph of tasks. I understand that Make allows the use of more high level features, such as globs, than ninja. If such high-level features are used then Make performs a more complex task than Ninja and we cannot expect Make to be faster. This is an unfair comparison.
However, assume that such high level features are not used. No globing, no pattern rules, just basic "out_file: in_file1, in_file2\n\tcommand to build" repeated over and over and over. Not using such high-level feature evens the playing field between Make and Ninja in terms of the task that they perform.
My understanding is that, if we limit Makefiles in such a way, that Ninja files and Makefiles can easily be transformed into each other. Is this correct?
Is there any inherent reason why Make executed on limited Makefiles is any slower than Ninja? or is it simply case of the standard Make implementations not being optimized for Makefiles that are structured in this way?