First, let me begin by saying that compiler switches are mainly targeted for specific processors (not operating systems). With the recent launch of the 3rd Generation Intel Core Processors (code-named Ivy Bridge), developers may be looking for information on any new switches that might have been developed to specifically support (and run the best on) our latest architecture. This blog will include the following:
If you are new to performance optimization, there are different levels of tuning you can do. The most basic performance optimization happens with testing your software with the use of different compiler switches. If you are happy with the performance then you can stop there. Some applications will require finer tuning (possibly requiring code changes and more complicated use of compiler intrinsics.) To get to this level of tuning you need to be able to characterize your application - is it memory intensive, CPU intensive, I/O intensive, graphics intensive and where are the “Hot Spots?”)
Many applications do have these so-called "Hot Spots" and in order to obtain peak performance, developers need to find them so that they can decide how to optimize their code. We find that there may not be a "generic" overall set of compiler switches that are best for the overall performance - what is considered to be a great option for some portions of an app may actually hinder other parts due to the nature of an application's particular characteristics.
While this blog will not cover how to characterize your application, you can take a look at what Intel offers for software profilers:
Mostly, optimizing for the 3rd Generation Intel® Core™ Processor Family is the same as optimizing for the 2nd Generation Intel Core Processor Family (code-named Sandy Bridge).
The new Intel Compiler Suites will install on the latest versions of Windows* and integrate with Microsoft Visual Studio* 2012 (Professional Addition and above), however they currently only support developing applications for the Desktop. The compatible switch for Visual Studio 2012 is /Qvc11. For Microsoft Visual Studio 2012 Express edition, the command line support is still available. URLs are included below providing further information.
Finding an app's optimal performance can mean different things to different developers (for different apps.) For some apps, simply experimenting with certain compiler switches is all that is needed or desired. Other apps may require a deeper understanding of an app's performance and the associated bottlenecks. For those apps, this blog also provides resources to the Intel profiling tools. The primary focus of this blog was to introduce the new compiler switches/instructions available for the 3rd Generation Intel Core Processors and to point out that the optimizations for the 2nd Generation Intel Core Processor Family are still highly relevant.
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