[cfe-dev] Some clang benchmarking on Windows

Francois Pichet pichet2000 at gmail.com
Mon Oct 11 12:02:54 PDT 2010


Hi,

I did some benchmarking of clang on Windows this morning, just for fun.
I used LLVM_TARGETS_TO_BUILD:STRING=all on cmake to include all the
targets (to be able to compare with what Rafael Espindola posted on
LLVM-Dev.)

I compiled 4 versions of clang:
   win32 and /O1
   win32 and /O2
   win64 and /O1
   win64 and /O2

/O1 is Minimize Size (configuration MinSizeRel)
/O2 is Maximize Speed  (configuration Release)

Everything was compiled using Visual Studio 2008, Windows 7 x64.

clang.exe size:
   win32 /O1:   9.3 MB      24% smaller
   win32 /O2:   12.3MB
   win64 /O1:   15.7 MB    15% smaller
   win64 /O2:   18.5 MB

Then I used my huge test.cpp that includes all the non templated
headers of Windows to compare the speed of compilation.
I used -fsyntax-only.

clang.exe speed (in seconds):
   win32 /O1:    7.9
   win32 /O2:    5.4    31% faster
   win64 /O1:    5.9
   win64 /O2:    5.4    8% faster


Now we need a way to create a new configuration using CMake to enable
LTO compilation with MSVC.



More information about the cfe-dev mailing list