Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intel C++ compiler as an alternative to Microsoft's?

Is anyone here using the Intel C++ compiler instead of Microsoft's Visual c++ compiler?

I would be very interested to hear your experience about integration, performance and build times.

like image 625
ROAR Avatar asked Dec 30 '09 20:12

ROAR


People also ask

What C compiler does Microsoft use?

Microsoft Visual C++ (MSVC) is a compiler for the C, C++ and C++/CX programming languages by Microsoft.

Does Windows have a built in C compiler?

The Visual Studio build tools include a C compiler that you can use to create everything from basic console programs to full Windows Desktop applications, mobile apps, and more.

Is Intel compiler better than GCC?

While their classic Intel C++ Compiler has been faster than upstream LLVM and GCC, their oneAPI DPC++/C++ Compiler 2021.3 is said to offer 41% faster performance than GCC 11.1 and similar margins to LLVM 12. The floating-point performance of their new LLVM-based compiler is about 19% higher than ICC.

What is the fastest C compiler?

The Zapcc is the fastest compiler in our compile test.


1 Answers

The Intel compiler is one of the most advanced C++ compiler available, it has a number of advantages over for instance the Microsoft Visual C++ compiler, and one major drawback. The advantages include:

  • Very good SIMD support, as far as I've been able to find out, it is the compiler that has the best support for SIMD instructions.

  • Supports both automatic parallelization (multi core optimzations), as well as manual (through OpenMP), and does both very well.

  • Support CPU dispatching, this is really important, since it allows the compiler to target the processor for optimized instructions when the program runs. As far as I can tell this is the only C++ compiler available that does this, unless G++ has introduced this in their yet.

  • It is often shipped with optimized libraries, such as math and image libraries.

However it has one major drawback, the dispatcher as mentioned above, only works on Intel CPU's, this means that advanced optimizations will be left out on AMD cpu's. There is a workaround for this, but it is still a major problem with the compiler.

To work around the dispatcher problem, it is possible to replace the dispatcher code produced with a version working on AMD processors, one can for instance use Agner Fog's asmlib library which replaces the compiler generated dispatcher function. Much more information about the dispatching problem, and more detailed technical explanations of some of the topics can be found in the Optimizing software in C++ paper - also from Anger (which is really worth reading).

On a personal note I have used the Intel c++ Compiler with Visual Studio 2005 where it worked flawlessly, I didn't experience any problems with microsoft specific language extensions, it seemed to understand those I used, but perhaps the ones mentioned by John Knoeller were different from the ones I had in my projects.

While I like the Intel compiler, I'm currently working with the microsoft C++ compiler, simply because of the financial extra investment the Intel compiler requires. I would only use the Intel compiler as an alternative to Microsofts or the GNU compiler, if performance were critical to my project and I had a the financial part in order ;)

like image 195
Tommy Andersen Avatar answered Sep 20 '22 23:09

Tommy Andersen