First of all, let me clarify my question is totally unrelated to Is there any benefit to passing all source files at once to a compiler?.
What I'd like to know here is whether my build-times would become faster if i made:
a) Many number of calls to the compiler with one single file each
b) Few number of calls to the compiler with many files each
c) Moderate number of calls to the compiler with a bunch of files each
Why am I asking this? I'm in the middle of creating a ninja generator (similar to the bunch here and I'd like to know what's the best way to create the dependency DAG.
You could claim spawning less subprocesses will be typically faster and less expensive but i'd like to know whether the gains would be worth or not so I can design my tool properly.
Just to clarify a little bit further, here's a simple example, as you can see in that build.ninja file there are many build statements with a 1:1 dependency per compiler call, so... could the build times improved by grouping few source files on single build statements?
EDIT: Also, I guess this Why is creating a new process more expensive on Windows than Linux? can provide some insights for the current topic