[cfe-dev] Fwd: clang++ vs g++ compilation speed for ace-tao servants
David Tweed
david.tweed at gmail.com
Fri Nov 8 09:13:05 PST 2013
Hi,
On Thu, Nov 7, 2013 at 10:53 PM, Igor Vagulin <igor.vagulin at gmail.com>wrote:
> Hi Richard,
>
> I've spend few days tweaking all possible flags on clang to make it
> work close to gcc. At best found combination clang was only about 30%
> worse than gcc(4.4 from rhel-6). Maybe you can give me another hint? I
> really want to switch :).
>
> I've create 100 copies of RemoveClusterObserver.cpp, below is test
> results of "time g++|clang++ -c RemoveClusterObserver-*cpp"
> g++: 0m58.510s
> clang++ default opts: 2m4.065s
> + march=core2: 1m43.729s
> + BUILD_SHARED_LIBS=NO: 1m27.216s
> + by-clang-build-by-clang++: 1m18.816s
>
> I've also trying measure compile time of clang sources, I thought this
> case should be comfortable for clang. No luck, clang still worse in
> every scenario. BTW here I also measured intel c compiler.
> - gcc-4.4:
> real 7m7.759s
> user 45m53.622s
> sys 2m3.657s
> - icc 2013-sp1:
> real 8m4.175s
> user 54m39.116s
> sys 2m35.159s
> - clang compiled by gcc:
> real 8m42.278s
> user 60m19.175s
> sys 0m51.341s
> - clang compiled by icc (who is paying for this compiler? :-/):
> real 8m2.399s
> user 57m31.185s
> sys 0m57.272s
>
> Then I thought maybe problem is x86 architecture and lack of register
> and switched to x86_64. Looks like that's the case, and people
> claiming "clang compiles faster than gcc" mean "on x86_64".
> - gcc:
> real 8m8.230s
> user 50m1.458s
> sys 3m44.313s
> - clang compiled by gcc:
> real 7m57.747s
> user 55m16.080s
> sys 1m27.786s
> - clang compiled by clang:
> real 6m41.412s
> user 44m53.298s
> sys 1m27.715s
> Igor Vagulin
>
>
> These are interesting results, but there are other variables that might be
explaining the
differences other than extra registers. Are you compiling on the same
machine in x86 and
x86_64 mode, or are they different machines with different amounts of
memory? It might
also be somewhat of the usual trade-off between keeping stuff in memory vs
doing stuff
in discrete steps via intermediate files being better or worse depending if
you've got
a "enough memory to hold it all" or not. (This is just suggested by the way
your system
times are always much lower for clang on both x86 and x86-64.) Building
clang in particular
is known to be very heavy on the memory.
Cheers,
Dave
--
cheers, dave tweed__________________________
high-performance computing and machine vision expert: david.tweed at gmail.com
"while having code so boring anyone can maintain it, use Python." --
attempted insult seen on slashdot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131108/9efa8fe1/attachment.html>
More information about the cfe-dev
mailing list