Discussion:
geeky OT stuff: clang 5 vs. gcc 7.2
René J.V. Bertin
2017-11-15 09:36:38 UTC
Permalink
Hi,

Maybe only sideways related (it could affect how well KDevelop is built?):

I just noticed LLVM 5.0 (actually -almost- 5.0.1) packages for my system on LLVM.org and could resist installing them to get my own idea what that intriguing major version step is all about. All I can say at the moment is that building with "-O3 -g" leads to significantly more compact binaries using clang than using GCC. Comparisons on sites like phoronix often suggest significant advantages to using clang both in build times and performance of the resulting binaries but I've rarely been able to reproduce that. The contrary, rather, and as far as I can tell even build times are somewhat shorter with GCC 7.2 than with clang 4.0 .

What are the experiences here? In particular, is there a noticeable advantage to building KDevelop with clang (be it 5 or 4 but I'd be curious to know also if clang 5 is really better than 4 in real life).

Thanks,

R.
Kevin Funk
2017-11-15 10:10:14 UTC
Permalink
Post by René J.V. Bertin
Hi,
You already mentioned it, it's off-topic really. Especially on the KDevelop
user-centric mailing list.

I don't think we have the capability to judge which compiler is in the lead
here. Not to mention just optimizing for compactness of code leaves out all
other (potentially more interesting) program optimizations.

You should check out the numerous benchmarks that test GCC vs Clang out there
(i.e. on Phoronix).

Regards,
Kevin
Post by René J.V. Bertin
I just noticed LLVM 5.0 (actually -almost- 5.0.1) packages for my system on
LLVM.org and could resist installing them to get my own idea what that
intriguing major version step is all about. All I can say at the moment is
that building with "-O3 -g" leads to significantly more compact binaries
using clang than using GCC. Comparisons on sites like phoronix often
suggest significant advantages to using clang both in build times and
performance of the resulting binaries but I've rarely been able to
reproduce that. The contrary, rather, and as far as I can tell even build
times are somewhat shorter with GCC 7.2 than with clang 4.0 .
What are the experiences here? In particular, is there a noticeable
advantage to building KDevelop with clang (be it 5 or 4 but I'd be curious
to know also if clang 5 is really better than 4 in real life).
Thanks,
R.
--
Kevin Funk | ***@kde.org | http://kfunk.org
René J.V. Bertin
2017-11-15 10:41:24 UTC
Permalink
Post by Kevin Funk
You already mentioned it, it's off-topic really. Especially on the KDevelop
user-centric mailing list.
Actually, I used this list to reach users of the product and thus a priori a larger number of developers ;)
Post by Kevin Funk
here. Not to mention just optimizing for compactness of code leaves out all
other (potentially more interesting) program optimizations.
Exactly why asked. Compactness is the easiest to judge, should affect loading times but the big difference here seems to be at the level of the debug information - which could potentially affect debug'ability. That's an aspect that might be of more interest here than on sites like Phoronix.
BTW, I'm not using any specific compactness optimisation, it's a by-product of compiler choice that might or might not be the only advantage.

We can move the discussion to the devel ML if you think there's an interest in discussing the potentially interesting optimisation options or how to gain any benefits from the "polly" optimiser?
Post by Kevin Funk
You should check out the numerous benchmarks that test GCC vs Clang out there
(i.e. on Phoronix).
I do. Or rather, I did - I lost interest in phoronix, as I said I never seem to be able to reproduce their findings (and they never seem to draw any conclusions in their reporting either).

R.

Loading...