共用方式為


/favor (Optimize for Architecture Specifics)

 

The latest version of this topic can be found at -favor (Optimize for Architecture Specifics).

favor:** option produces the code that is optimized for a specific architecture or for the specifics of micro-architectures in the AMD and the Intel architectures.

Syntax

/favor:{blend | ATOM | AMD64 | INTEL64}  

Remarks

/favor:blend
(x86 and x64) produces the code that is optimized for the specifics of micro-architectures in the AMD and the Intel architectures. 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) 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) 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) 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.

Note

Intel64 architecture was previously known as Extended Memory 64 Technology, and the corresponding compiler option was /favor:EM64T.

For information about how to program for the x64 architecture, see x64 Software Conventions.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  2. Select the C/C++ folder.

  3. Select the Command Line property page.

  4. Enter the compiler option in the Additional Options box.

To set this compiler option programmatically

See Also

Compiler Options
Setting Compiler Options