[flang-dev] Build Time Comparision

Michael Kruse via flang-dev flang-dev at lists.llvm.org
Tue Jul 28 15:03:32 PDT 2020

At yesterday's flang technical call, we wanted to have an additional data
point for the build time of flang itself, by also getting the compilation
time using msvc.

Using my personal notebook with Intel Core i7-7700HQ CPU @ 2.80GHz, 16GB
RAM, Windows 10 1909. I could not find a reliable way to get the
user/system time for a process tree under Windows, so I am using wall clock
time and single threads (ninja -j1). To keep the build time reasonable, I
only timed compilation flang itself and its f18 executable (ninja says 130
tasks after touching every file in the flang subdirectory, consistent with
every compiler). -DCMAKE_BUILD_TYPE=Release. I was using the computer while
taking the time. Peak resident/working set size was determined using python

Msvc has parallelized its code generation and uses 4 threads by default. To
make numbers more comparable, I have another run where I switched this off


GCC 7.5 (Ubuntu 18.04.4, WSL)
Wall clock duration: 0:45:47
Peak compiler resident size: 4042.9 MiB (by cc1plus PFTBuilder.cpp)
Peak linker resident size: 151.8 MiB (by ld.lld f18)

Clang 11.0.0 (release build 3e94943d, WSL)
Wall clock duration: 1:42:22
Peak compiler resident size: 3266.0 MiB (by clang++ PFTBuilder.cpp)
Peak linker resident size: 260.7 MiB (by ld.lld f18)

MSVC 19.26.28806 (Visual Studio 2019 16.6.5 -- current latest)
Wall clock duration: 0:59:26
Peak compiler working set: 7915.9 MiB (by cl.exe f18.cpp)
Peak linker working set: 747.9 MiB (by link.exe f18.exe)

MSVC /cgthreads1
Wall clock duration: 1:32:19
Peak compiler working set: 7918.3 MiB (by cl.exe f18.cpp)
Peak linker working set: 747.9 MiB (by link.exe f18.exe)

I also tried Intel icc, which unfortunately failed: tablegen does recognize
its command line argument. I assume the cl::opt command line registration
static initializer does not work.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-dev/attachments/20200728/dbbecc22/attachment.html>

More information about the flang-dev mailing list