Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Benchmarks for Intel C++ compiler and GCC

I have an AMD Opteron server running CentOS 5. I want to have a compiler for a fairly large C++ Boost based program. Which compiler I should choose?

like image 767
James Bond Avatar asked Nov 14 '09 07:11

James Bond


People also ask

Is Intel compiler faster than GCC?

With 1 parallel copy, UnixBench compiled with Intel's is about 20% faster than the version compiled with GCC.

Is GCC good for C?

Though there are many compilers available for C, GCC stands out to be one of the best as of now. The winner declaration here lies based on durability, optimization, speed, and code/error/syntax checks.

Which is the fastest C compiler?

The Zapcc is the fastest compiler in our compile test.

What is GCC benchmark?

gcc is based on gcc Version 3.2. It generates code for an AMD Opteron processor. The benchmark runs as a compiler with many of its optimization flags enabled. 403. gcc has had its inlining heuristics altered slightly, so as to inline more code than would be typical on a Unix system in 2002.


2 Answers

There is an interesting PDF here which compares a number of compilers.

like image 106
Goz Avatar answered Sep 18 '22 05:09

Goz


I hope this helps more than hurts :)

I did a little compiler shootout sometime over a year ago, and I am going off memory.

  1. GCC 4.2 (Apple)
  2. Intel 10
  3. GCC 4.2 (Apple) + LLVM

I tested multiple template heavy audio signal processing programs that I'd written.

Compilation times: The Intel compiler was by far the slowest compiler - more than '2x times slower' as another posted cited.

GCC handled deep templates very well in comparison to Intel.

The Intel compiler generated huge object files.

GCC+LLVM yielded the smallest binary.

The generated code may have significant variance due to the program's construction, and where SIMD could be used.

For the way I write, I found that GCC + LLVM generated the best code. For programs which I'd written before I took optimization seriously (as I wrote), Intel was generally better.

Intel's results varied; it handled some programs far better, and some programs far worse. It handled raw processing very well, but I give GCC+LLVM the cake because when put into the context of a larger (normal) program... it did better.

Intel won for out of the box, number crunching on huge data sets.

GCC alone generated the slowest code, though it can be as fast with measurement and nano-optimizations. I prefer to avoid those because the wind may change direction with the next compiler release, so to speak.

I never measured poorly written programs in this test (i.e. results outperformed distributions of popular performance libraries).

Finally, the programs were written over several years, using GCC as the primary compiler in that time.

Update: I was also enabling optimizations/extensions for Core2Duo. The programs were clean enough to enable strict aliasing.

like image 22
justin Avatar answered Sep 21 '22 05:09

justin