There are some notable differences between the Intel® C++ Compiler and the Microsoft* compiler. Consider the following as you begin compiling your code with the Intel® C++ Compiler.
Setting the Environment
The compiler installation provides a batch file,
, that sets the proper environment for the Intel® C++ Compiler. For information on running
The Intel® C++ Compiler is an optimizing compiler that begins with the assumption that you want improved performance from your application when it is executed on Intel® architecture. Consequently, certain optimizations, such as option
O2, are part of the default invocation of the Intel® C++ Compiler. By default, Microsoft* turns off optimization, which is the equivalent of compiling with options
O0. Other forms of the
n] option compare as follows:
Intel® C++ Compiler
Turns off all optimization. Same as
Default. Turns off all optimization.
Decreases code size with some increase in speed.
Optimizes code for minimum size.
Default. Favors speed optimization with some increase in code size. Intrinsics, loop unrolling, and inlining are performed.
Optimizes code for maximum speed.
-O2optimizations plus more aggressive optimizations, such as prefetching, scalar replacement, and loop and memory access transformations.
Targeting Specific Intel® Processors
While many of the same options that target specific processors are supported with both compilers, the Intel® C++ Compiler includes options that utilize processor-specific instructions to target the latest Intel® architecture processors. Consider using the Intel® C++ Compiler , , or options for applications that run on IA-32 architecture or Intel® 64 architecture. Refer to the descriptions of these compiler options for more specific information.
Modifying Your Configuration
The Intel® C++ Compiler lets you maintain configuration and response files that are part of compilation. Options stored in the configuration file apply to every compilation, while options stored in response files apply only where they are added on the command line. If you have several options in your makefile that apply to every build, you may find it easier to move these options to the configuration file (
In a multi-user, networked environment, options listed in the
icl.cfgfile are generally intended for everyone who uses the compiler. If you need a separate configuration, you can use the
ICLCFGenvironment variable to specify the name and location of your own
.cfgfile, such as
\my_code\my_config.cfg. Anytime you instruct the compiler to use a different configuration file, the
icl.cfgsystem configuration file is ignored.
Using the Intel® Libraries
The Intel® C++ Compiler supplies additional libraries that contain optimized implementations of many commonly used functions. Some of these functions are implemented using CPU dispatch. This means that different code may be executed when run on different processors.
Supplied libraries include the Intel® Math Library (
libm), the Short Vector Math Library (
libirc, as well as others. These libraries are linked in by default when the compiler sees that references to them have been generated. Some library functions, such as
memset, may not require a call to the library, since the compiler may inline the code for the function.
Intel® Math Library (
With the Intel® C++ Compiler, the Intel® Math Library,
libm, is linked by default when calling math functions that require the library. Some functions, such as
sin, may not require a call to the library, since the compiler already knows how to compute the
sinfunction. The Intel® Math Library also includes some functions not found in the standard math library.
You cannot make calls to the Intel® Math Library with the Microsoft* compiler.
Many routines in the
libimflibrary are more optimized for Intel® microprocessors than for non-Intel microprocessors.
Short Vector Math Library (
When vectorization is in progress, the compiler may translate some calls to the
libmmath library functions into calls to
svml_dispfunctions. These functions implement the same basic operations as the Intel® Math Library, but operate on short vectors of operands. This results in greater efficiency. In some cases, the
svml_dispfunctions are slightly less precise than the equivalent
Many routines in the
svmllibrary are more optimized for Intel® microprocessors than for non-Intel microprocessors.
libirccontains optimized implementations of some commonly used string and memory functions. For example, it contains functions that are optimized versions of
memset. The compiler will automatically generate calls to these functions when it sees calls to
memset. The compiler may also transform loops that are equivalent to
memsetinto calls to these functions.
Many routines in the
libirclibrary are more optimized for Intel® microprocessors than for non-Intel microprocessors.
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804