[cfe-users] clang++ vs g++ compilation speed for ace-tao servants

Igor Vagulin igor.vagulin at gmail.com
Tue Oct 29 20:45:22 PDT 2013

Hi All,

We are evaluating switch to clang from gcc for our c++ application. Main
focus is compilation speed, but we also look at address/memory sanitizer,
c++11 support and c++ modules. I've tried to compile our project with
clang++ but resulting compilation time is more than with gcc. Can someone
give me a hint where might be a problem?

Our project is bunch of ace-tao corba servants. Overall time with clang++
is about twice more than with gcc. To reproduce problem I preprocesssed one
file and then compile it, result same - twice longer compilation. Don't
know where to look further.
[root at ivagulin-pc ~]# time clang++ -c RemoveClusterObserverClang.cpp
real    0m1.283s
user    0m1.254s
sys    0m0.024s
[root at ivagulin-pc ~]# time g++ -c RemoveClusterObserverGcc.cpp
real    0m0.576s
user    0m0.524s
sys    0m0.048s

I use llvm-3.3 and cfe-3.3 compiled with folowing options. Sources of
RemoveClusterObserver*cpp attached.
'-DCMAKE_CXX_FLAGS_RELEASE=-O3 -g -mtune=amdfam10 -march=i686'
'-DCMAKE_C_FLAGS_RELEASE=-O3 -g -mtune=amdfam10 -march=i686'
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=-Wl,--as-needed -Wl,--strip-all'
'-DCMAKE_MODULE_LINKER_FLAGS_RELEASE=-Wl,--as-needed -Wl,--strip-all'
'-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=-Wl,--as-needed -Wl,--strip-all

Igor Vagulin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20131030/8e2d4f1e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sources.tar.bz2
Type: application/x-bzip2
Size: 603927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20131030/8e2d4f1e/attachment.bin>

More information about the cfe-users mailing list