Better HN
topnewbestaskshowjobs
Log inSign up

compilerdev

15 karma · joined Jul 22, 2018 (8y ago) · 8 submissions

Submissions

comment 8y ago · link · parent

The article is about the performance of the code generated by Clang/GCC, not the compile time one gets using them. For those interested in compile time scaling with number of cores, below are results from testing I did on Windows 10 with latest Chrome sources: https://www.reddit.com/r/Amd/comments/99ckjv/threadripper_29...

comment 8y ago · link · parent

Yes, the issue is the LTCG build, which by default uses 4 threads and with Chromium the compiler hits some pathological issues with such a huge program and it ends up using mostly 1 core and swapping lots of memory.

comment 8y ago · link · parent

See my other answer in this threaad, the main reason for the strange result is doing an LTCG build, not really the CPU, which scales quite nicely in the Linux tests from Phoronix.

comment 8y ago · link · parent

See my answer above, it's because the build was LTCG and in the best case at most 4 cores were used during optimization/code geneation/linking.

comment 8y ago · link · parent

Ian Cutress replied on the article comments that LTCG is indeed used. With LTCG those strange results make sense - it's spending a lot of time on just 4 threads by default - actually majority of the time is on one thread for the Chromium case, it hits some current limitations of the VC++ compiler regarding CPU/memory usage that makes scaling worse for Chromium (but not for smaller programs or with non-LTCG builds). Increasing the number of threads from the default of 4 is possible, but will not help here. The frontend (parsing) work is well parallelized by Ninja, it's probably the reason why the Threadrippers do end up ahead of the faster single-core Intel CPUs.

comment 8y ago · link · parent

The Chrome compilation looks really strange indeed, especially with having the results from Phoronix on Linux which show that it's the fastest compiling the Linux kernel. I wonder what kind of Chrome build it's doing - does it use Clang-cl or Visual C++? Does it have LTO (LTCG for VC++) enabled? If it's VC++ with LTCG, for example, the entire code generation and linking is limited to 4 cores by default.

comment 8y ago · link · parent

Not to take anything away from this, it's great that such a tool is available, but Microsoft had this kind of technology 20 years ago, known as BBT - still used in some places, but overall systems moved to profile guided optimizations done by Visual C++ (an overall improvement over BBT). It is mostly focused on doing block/function placement optimizations to reduce paging and separate hot/cold code. Some info here: https://blogs.msdn.microsoft.com/reiley/2011/08/06/microsoft....