Channels ▼

The Most Underused Compiler Switches in Visual C++

, March 11, 2014 Microsoft's Visual C++ team explains the nine most underused switches and why you should make sure to include them in your build.
  • E-mail
  • Print

/favor:

/favor: options produce code that is optimized for a specific architecture or for the specifics of micro-architectures in the AMD and the Intel architectures. Choose from the options below based upon the micro-architecture you care most about:

/favor:blend (x86 and x64). While /favor:blend may not give the best performance possible on a specific processor, it is designed to give the best performance across a broad range of x86 and x64 processors. By default, /favor:blend is in effect.

/favor:ATOM (x86 and x64). This produces the code that is optimized for the specifics of the Intel Atom processor and Intel Centrino Atom Processor Technology. Code that is generated by using /favor:ATOM may also produce Intel SSSE3, SSE3, SSE2, and SSE instructions for Intel processors.

/favor:AMD64 (x64 only), This optimizes the generated code for the AMD Opteron and Athlon processors that support 64-bit extensions. The optimized code can run on all x64 compatible platforms. Code that is generated by using /favor:AMD64 might cause worse performance on Intel processors that support Intel64.

/favor:INTEL64 (x64 only). This optimizes the generated code for Intel processors that support Intel64, which typically yields better performance for that platform. The resulting code can run on any x64 platform. Code that is generated with /favor:INTEL64 might cause worse performance on AMD Opteron and Athlon processors that support 64-bit extensions.

Additional Comments

If you know your application is destined to run a lot more often on particular architectures in this list, this option can come in handy! Try it out, for example, when writing apps for the Intel Atom micro-architecture found in tablets, microservers, and smartphones. From our internal benchmarking, we know users can except low single-digit percent performance gains on CPU cycles.






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.