12

I have been using the GCC Compiler for months, which is great, and works very well. But I wonder which C++ Compiler do big/medium enterprises use for high optimizations/performance in Linux (x86, PowerPC...).

It may seem a very stupid question, but I havent found the answer anywhere.

As far as I know, the best PowerPC Compiler is the XL, but x86 I dont know anything.

EDIT: Thanks a lot for all the answers. They were all very helpful. You have convinced me to use GCC ;) Regards!

icedgoal
  • 646
  • 6
  • 17
  • 1
    gcc and llvm (llvm is a new up-and-comer) – pickypg Jun 03 '11 at 21:33
  • ICC & CLANG can provide better compiler errors, performance difference isn't always significant. – Steve-o Jun 04 '11 at 18:38
  • @People voting to close: This question isn't argumentative. Probably should be CW, but definitely not a candidate for closure as "subjective and argumentative". – Ben Voigt Jun 05 '11 at 01:53
  • GCC, ICC, and clang are almost the same in terms of performance https://attractivechaos.github.io/plb/ when compared objectively. There might be some specific tasks that a vendor (Intel) optimizes for, but by-and-large they're all excellent. –  Sep 12 '15 at 09:07

6 Answers6

10

In the places I have worked we have always used gcc, even for embedded applications/software.

Performance improvements are much more likely to come from your code rather than your compiler choice anyway!

Colin
  • 2,001
  • 13
  • 28
  • Thanks for answering. I supose that the difference between GCC and other compilers its minium. Regards! – icedgoal Jun 04 '11 at 08:16
  • Are you implying that gcc`s performance is worse that other compilers have to offer? Any proof? –  Jun 13 '11 at 12:25
  • 1
    Not at all, I wasn't implying anything other than GCC is commonly used (by large companies/enterprises), and that differences in compiler optimization will not vary as greatly as general code optimization, in terms of overall performance. – Colin Jun 13 '11 at 15:52
5

Intel sells its own compilers which are supposed to generate very performant code...at least on Intel CPUs.

The nice thing about ICC compared to GCC is that ICC uses EDG's C++ frontend, which means that it has better support for some advanced C++ features than GCC.

C. K. Young
  • 219,335
  • 46
  • 382
  • 435
  • 5
    What advanced C++ features does EDG support that GCC does not? (Other than `export`, which no compiler except EDG bothered to implement, and was deprecated in C++0x). – HighCommander4 Jun 03 '11 at 21:37
  • 2
    @HighCommander: GCC supports most of the same features EDG does, but EDG is generally regarded as the more "standards-compliant" compiler, in that it's much less tolerant of input which is nonstandard than GCC is. – Billy ONeal Jun 03 '11 at 22:17
  • 2
    @HighCommander4: no, `export` is *removed* in C++0x. The functionality, that is: the word is still reserved. – Steve Jessop Jun 03 '11 at 22:55
  • I had seen the ICC compilers before and as far as I know, they are great in performance, but the disadvantage is that its not cheap at all :). For OpenSource it is, but for commercial, not. Regards! – icedgoal Jun 04 '11 at 08:16
5

Everyone uses GCC - most Sun sites (for example) I've worked at replace their crappy Sun development tools (And boy, are they crappy) with Open Source ones like GCC.

1

For embedded PowerPC, check out the Wind River Diab Compiler.

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
1

Intel Compiler Collection, Sun ONE Studio, IBM XL C Compiler, Open64, Open Watcom, and of course GCC.

I presume some companies must be using Sun ONE & xlC for porting large projects as there is no reason why anyone would normally to use them.

Steve-o
  • 12,678
  • 2
  • 41
  • 60
  • 1
    I'll tell you why one large company uses the Sun Studio and IBM xlC tools: support. That is, when they have some unusual need (and they do have them), they can go straight to Sun or IBM (from whom they buy a lot of stuff, including huge servers) and ask for patches to address this limitation or that missing feature. – John Zwinck Jun 05 '11 at 02:31
  • IBM's (paid) support for xlC/C++ compiler is just great (at least, on AIX - as I don't see any reason to use it on Linux). I've never seen such support from any other big company. – vond Jun 24 '12 at 14:22
  • As for the SunCC compiler - it's problematic because of its standard library. SunCC comes with old version 4 of STLport which performs really bad in multithreaded apps because of single global mutex. libCstd is much better for performance, but it's very old and some constructs have to be changed. Overall, I enjoyed a lot using Sun's profiler (part of Solaris Studio), because it's the only profiler I know that is able to measure waits (such as waiting on mutexes, on blocking network I/O operations, etc). I'm not sure if it's possible to use it if the code is compiled with GCC. – vond Jun 24 '12 at 14:29
1

EKOPath 4 Compiler Suite

https://github.com/path64/repositories

http://www.pathscale.com/ekopath-compiler-suite

PathScale is freely releasing the source to the EKOPath 4 Compiler Suite. EKOPath 4 is a high-performance compiler that up until now has been proprietary and costs nearly $2000 USD per license, but now it's open-source and can sharply outperform GCC in many computationally-intense workloads. The community indeed is excited for EKOPath now being open-source (GPLv3)

plan9assembler
  • 2,862
  • 1
  • 24
  • 13