<div dir="ltr">Did you just build once for each number? If so, disk cache effects will make your measurements unreliable. I recommend doing 3 consecutive builds for each number and then recording the smallest of these 3 numbers.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 18, 2017 at 9:14 AM, Boris Kolpackov via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have implemented the separate preprocess and compile setup in build2.<br>
For Clang it is using -frewrite-includes (thanks to everyone's suggestions<br>
in the earlier thread). I've also done some benchmarking:<br>
<br>
<a href="https://build2.org/article/preprocess-compile-performance.xhtml" rel="noreferrer" target="_blank">https://build2.org/article/<wbr>preprocess-compile-<wbr>performance.xhtml</a><br>
<br>
TL;DR for Clang:<br>
<br>
Cost of a separate preprocessor run is less than 5% of a non-optimized<br>
C++ build.<br>
<br>
Interestingly, for GCC (with -fdirectives-only which does more than<br>
-frewrite-includes) a separate preprocessor run is actually faster<br>
(probably because of the time-localization of filesystem access).<br>
<br>
Boris<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>