FWIW, I build a large project both with MSBuild+cl /MP and Ninja. Ninja is always faster (for my case), even though it doesn’t use /MP. What I experience is:
- MSBuild scheduler seems to not start compilation of projects until all dependent projects are finished linking. Ninja is more intelligent in this regard and will happily start compilations of depending projects while dependents are also compiling.
- MSBuild’s own parallelism (/m: switch) fights with cl.exe spawning up threads internally via /MP. Without careful hand-tuning, it tends to way oversusbcribe the machine’s cpus. Ninja keeps all the cpus busy without oversubscribing them and causing mouse stutter on the machine in general like I’ve experienced with MSBuild.
HTH.