<div dir="ltr"><div>The most speedup you'll get is where there's least dependencies (imports or exports), with zero being the optimal number (a "root" file). If there are more than zero dependencies for a given file then the total time it will take to finish the file will be its own compile time plus the total time of its slowest dependency, that is, the sum of the compile times of the slowest compiling files between it and some root file. The slowest of those is the "critical path."</div><div><br></div><div>Of course that assumes that you have an infinite number of processors. Because you don't you then have to ensure that the critical path gets priority in processing, since delaying it for any other work would be counterproductive. Realistically the critical path and that scheduling can only be guessed before the first compile, unless file size is an accurate predictor of compile time, or some sort of prior analysis is done.</div><div><br></div><div>The critical path represents the serial portion of the compilation so if you figure out that as the percentage of the total compilation you can get an idea of the maximum possible speedup using Amdahl's law. Here is a rather depressing graph that illustrates it:</div><div><br></div><div><a href="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/AmdahlsLaw.svg/648px-AmdahlsLaw.svg.png">https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/AmdahlsLaw.svg/648px-AmdahlsLaw.svg.png</a><br></div><div><br></div><div>Also while compiling the entire repository in parallel may yield a significant speedup, most people compile incrementally, involving relatively few files.</div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 8, 2015 at 8:05 PM, Jay K <span dir="ltr"><<a href="mailto:jay.krell@cornell.edu" target="_blank">jay.krell@cornell.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Is anyone interested in updating m3front to be multi-threaded?<div><br></div><div>I haven't seen a single core system in a while.</div><div><br></div><div>Surely each module can be compiled separately, possibly with some serialization around compiling interfaces?</div><div><br></div><div>Thanks,</div><div> - Jay<br><br></div> </div></div>
<br>_______________________________________________<br>
M3devel mailing list<br>
<a href="mailto:M3devel@elegosoft.com" target="_blank">M3devel@elegosoft.com</a><br>
<a href="https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3devel" rel="noreferrer" target="_blank">https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3devel</a><br>
<br></blockquote></div><br></div></div>