Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

Choosing the best compiler to c++

Vidura_Dhananjaya
New Contributor II
900 Views

There are many compilers to c++, what is the most suitable for the c++ and also the fastest.

0 Kudos
1 Solution
bernaske
New Contributor I
840 Views

Hi,

i (we) have tested some compilers such as gcc-4.9, pathscale , pgi-14.1, and the new Intel Cluster_Studio_XE_2015 Beta with

the compilers icc / icpc 15.0.0 under openSUSE 13.1, 13.2, SUSE Enterprise Server 11 SP3 / SUSE SLES 12.0 Beta 8 all

as 64 Bit Release Linux ,  the best is the ICC / ICPC 15.0 he works with our CUDA 6.0 SDK with great performance.

my choice for performance critical applications is the Intel Compiler, follow from gcc-4.9.

But the Intel ICC/ICPC 15.0.0 is the best choice under Linux.

 

View solution in original post

37 Replies
Bernard
Black Belt
660 Views

It probably depends on the application type. For example numerical and scientific calculation with code vectorization I would choose ICC.

TimP
Black Belt
660 Views

As the question is phrased, choices of operating system etc. are included in the question, so it may be pointless to attempt to answer.  As Iliiya said, if vectorization is a top criterion, Intel C++ would rank high.

bernaske
New Contributor I
841 Views

Hi,

i (we) have tested some compilers such as gcc-4.9, pathscale , pgi-14.1, and the new Intel Cluster_Studio_XE_2015 Beta with

the compilers icc / icpc 15.0.0 under openSUSE 13.1, 13.2, SUSE Enterprise Server 11 SP3 / SUSE SLES 12.0 Beta 8 all

as 64 Bit Release Linux ,  the best is the ICC / ICPC 15.0 he works with our CUDA 6.0 SDK with great performance.

my choice for performance critical applications is the Intel Compiler, follow from gcc-4.9.

But the Intel ICC/ICPC 15.0.0 is the best choice under Linux.

 

Vidura_Dhananjaya
New Contributor II
660 Views
If anyone can,please send me link about that compilers...
TimP
Black Belt
660 Views

https://gcc.gnu.org/releases.html

https://software.intel.com/en-us/c-compilers

https://software.intel.com/en-us/articles/intel-software-development-tools-2015-beta

gcc has nearly caught up in vectorization and in OpenMP parallelism used separately. This assumes that you take the trouble to use g++ and icpc consistently (the simplest compiler options aren't equivalent). icpc 15.0 has advantages over g++ in combining vector and parallel, even though most of the OpenMP 4 syntax is likely to be accepted in released gcc soon.

jimdempseyatthecove
Black Belt
660 Views

My 2 cents worth are:

Are you most interested in vectorization and/or parallelization performance of standardized benchmarks.

Or, are you most interested in the vectorization and/or parallelization performance of your application.

The two are not necessarily the same. I suggest you look at several (many) exemplars from your peer group. Also be mindful that should a problem be exposed (compiler bug or incomplete feature), which compiler is likely to get it fixed within your critical time frame? Be sure to ask your peer group about the warts too (what they do not like).

Jim Dempsey

Kittur_G_Intel
Employee
660 Views

Hi,
If you're comparing with GCC and basing on standard benchmarks (like SPEC, EEMBC) and with explicit vectorization etc., then ICC does better. You can take a look at the published results for example on the Spec org site. 

In general, you use ICC 
   
-> for performance like mentioned above 
   -
> Source, command and binary compatibility with GCC
   -> 
Numerous tools/methods to enable Parallelism (like Vector Parallelism, Task Parallelism in addition to multi-threaded high performance libraries like IPP, TBB, MKL and so on. 

Please refer to the web site https://software.intel.com/en-us/intel-composer-xe  to get more details/snapshot of the features/benchmarks etc.

_Kittur

 

TimP
Black Belt
660 Views

gcc has fewer options for optimization than icc.  You can't get the best out of either without learning the various command line options.  If your criterion is that a good compiler has aggressive optimization as a default, gcc is not that compiler.  On the other hand, gcc has command line options which can optimize without in-line pragmas needed with icc.

This clearly gets away from the ability to make a flat statement about one compiler being better than another.

Jim raised the point about bug fixes.  With gcc, you must take full responsibility for isolating and filing bugs, and you still need a larger element of luck to find someone to work on them given that you aren't paying for support. Both compilers have a remarkably good level of support relative to the fees paid, but those fees make a difference.

Kittur_G_Intel
Employee
660 Views

Tim/Jim make some very good points to bear in mind. That said, if you base on standard compiler benchmarks per-se and the various parallel methodologies/features that ICC offers, it's wise for the user to look into more details and decide based on the context of the application/licensing/fees and most importantly support (if needed) etc.

_Kittur

emmanuel_attia
Beginner
660 Views

I'm very surprised that no one mention clang++ that in many case generate the same performance code as Intel C++ or GCC but taking linear times / polynomial times where those latter take exponential time (i'm speaking about compilation time, which in some case make a huge difference in compiler choice, escpially when you are in pre-dev / research).

Kittur_G_Intel
Employee
660 Views

Yes, compilation time is another factor for consideration based on the context of the application domain. Good point...

_Kittur

Vidura_Dhananjaya
New Contributor II
660 Views

thanks Tim

SergeyKostrov
Valued Contributor II
660 Views
>>...There are many compilers to c++, what is the most suitable for the c++ and also the fastest. Legacy Borland C++ v5.x outperforms ALL existing modern C++ compilers ( I mean a compilation time, for example for a 150K C++ code lines project ). However it Does Not support latest C++ features and standards. Notes: - Compiler is Free for more than 10 years and could be found on many file-servers - 32-bit Windows only and there is No support for 64-bit Windows platforms - Integration with Visual Studios or Eclipse IDE could be easily done - Support for the compiler is stopped for many years ( Do Not expect any updates ) and in case of any internal bugs a developer needs to find a workaround PS: I've been using it a lot for verification C++ compatibility.
Vidura_Dhananjaya
New Contributor II
660 Views

can you more describe about it Sergey..?? 

J_W
Beginner
660 Views

Is there any bechmark of all the compilers comparison?

Kittur_G_Intel
Employee
660 Views

For comparison purposes the most commonly used benchmarks are the ones published by SPEC. Member companies publish results of their (SPEC) standard test suites (ex: Spec2006)  You can visit http://www.spec.org/spec/  to get more info.

_Kittur

Vidura_Dhananjaya
New Contributor II
660 Views

thanks

Kittur_G_Intel
Employee
660 Views

Sure. BTW, during your evaluation of the Intel Compiler, if you need any clarification or specific information on any of the features of the compiler thereof, please let us know or you can again post it on the forum of course, thanks.

_Kittur

Vihanga_A_
New Contributor I
660 Views

If you're  interested in Windows development  use Visual Studio. Use Xcode if you're interested in Apple Macs.

Kittur_G_Intel
Employee
570 Views

Additionally, you can get evaluation copies of these compilers you plan to try and run some benchmarks (your own applications) to get an idea on how they fare as well. For getting evaluation license/packages for Intel compilers you can visit https://software.intel.com/en-us/articles/try-buy-tools ;

_Kittur

Reply