<div dir="ltr">I was wondering why compiles were so slow and noticed that clang-cl.exe is never consuming more than ~16.5% CPU on my laptop. This is an i7-7700HQ, 32GB memory, running Windows 10 Pro.<div><br></div><div>Memory and disk use appear trivial as well, and the computer was otherwise mostly idle at the time. </div><div><br></div><div>Compiling a trivial hello-world takes 11 seconds:</div><div><br></div><div><font face="monospace, monospace">$ clang --version<br></font></div><div><font face="monospace, monospace">clang version 4.0.1</font></div><div><font face="monospace, monospace">Target: i686-pc-windows-msvc</font></div><div><font face="monospace, monospace">Thread model: posix</font></div><div><font face="monospace, monospace">InstalledDir: C:\LLVM\bin</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">$ cat foo.cpp<br></font></div><div><font face="monospace, monospace">#include <iostream></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">int main()</font></div><div><font face="monospace, monospace">{</font></div><div><font face="monospace, monospace">    std::cout << "Yo" << std::endl;</font></div><div><font face="monospace, monospace">    return 0;</font></div><div><font face="monospace, monospace">}</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">$ time clang-cl foo.cpp<br></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">real    0m11.886s</font></div><div><font face="monospace, monospace">user    0m0.015s</font></div><div><font face="monospace, monospace">sys     0m0.015s</font></div><div><br></div><div>Compiling the same program under the Linux subsystem and clang-3.5 takes 0.16seconds. The Visual Studio commandline compiler is likewise almost instant.</div><div><br></div><div>This is release_40 from one of the git mirrors, build built as part of the LLVM tree using Visual Studio 2015 command prompt, with (I think, not 100% sure, don't know cmake well enough to figure out after the fact) the following cmake invovations:</div><div><br></div><div><div>cmake -G "MinGW Makefiles" \</div><div>  -DCMAKE_INSTALL_PREFIX=C:\LLVM \</div><div>  -DCMAKE_BUILD_TYPE=Debug \</div><div>  -DLLVM_ENABLE_ASSERTIONS=On \</div><div>  -DLLVM_TARGETS_TO_BUILD=X86 \</div><div>  -DLLVM_ENABLE_CXX1Y=On \</div><div>  ../</div></div><div>cmake --build .</div><div><br><div>Did I pick spectacularly stupid build options or something?</div><br>Any suggestions for figuring out what is going on? (Windows is not my regular platform so I'm a bit out of depth here.)<br><br><div>Cheers,<br></div></div><div><br></div><div> -- nikodemus</div><div><br></div></div>