[cfe-dev] Fwd: clang++ vs g++ compilation speed for ace-tao servants

Richard Smith richard at metafoo.co.uk
Thu Oct 31 12:19:06 PDT 2013


I suspect the problem is overload resolution for the several hundred
overloads of each of 'operator<<', 'operator<<=', 'operator>>', and
'operator>>=' that are present here. Many of these have the same LHS
parameter type; we could probably improve performance here by caching the
computation of an implicit conversion sequence for a given (argument,
parameter type) pair.


On Thu, Oct 31, 2013 at 10:05 AM, David Blaikie <dblaikie at gmail.com> wrote:

>
>
>
> On Wed, Oct 30, 2013 at 11:59 PM, Igor Vagulin <igor.vagulin at gmail.com>wrote:
>
>> 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.
>>
>
> If you're lucky, someone might look for you if you attach (or link to, if
> it's too big to attach) an example of the problem.
>
> Otherwise, you might want to get started with a profiler and see where the
> hot parts of Clang/LLVM are in your example.
>
> (also, consider trying with Clang top of tree (straight from svn/git) -
> the project moves fairly quickly)
>
>
>> [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.
>> + cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
>> '-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
>> -shared' -DCMAKE_SKIP_RPATH=YES -DBUILD_SHARED_LIBS=YES
>> -DLLVM_ENABLE_TIMESTAMPS=NO ..
>>
>> Igor Vagulin
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131031/2e49d065/attachment.html>


More information about the cfe-dev mailing list