Setting up Application Project Properties in Visual Studio .NET 2003


Visual Studio C++ Optimization Properties

Here we will examine the C++ Compiler Optimization Properties Tab.


For your Debug build everything on this tab should be disabled or at their default settings.



For your Release build you will want to customize these settings to your project's needs. Make sure your Build Configuration is set to Release before setting any of these!



Optimization
This option tells the compiler what specifically to optimize. Since different projects have different requirements there are a few different choices:

  • Disabled
  • Minimize Size
  • Maximize Speed
  • Full Optimization

For this class, we are not generally worried about memory requirements; however, we are worried about speed. It is suggested to use the Maximize Speed option over the Full Optimization option because the compiler may make trade-offs for a smaller size over faster speed in some cases.


Global Optimizations
This option tells the compiler whether or not to optimize the code as a whole.

It should be noted that this option can dramatically affect build times. It should definitely be used in the last couple weeks of the course, if not earlier.


Inline Function Expansion
This option tells the compiler how to treat inline functions. Choices include:

  • Default
  • Only __inline
  • Any Suitable

This is a recommendation -- the inline keyword is a hint to the compiler.

For the purposes of this class, we want any suitable function to be inlined to maximize speed.


Floating-Point Consistency
This option tells the compiler whether or not it should enable or disable optimizations used within floating-point calculations that may affect tests for floating-point equality and inequality.

Choosing Improved Consistency will disable these optimizations.

For the purposes of this class, it is recommended to stick to Default Consistency.


Favor Size or Speed
This option tells the compiler whether it should be globally optimizing for size or for speed. This option must be used with the Global Optimizations setting on.

As stated above, we are concerned with speed in this class. Choose the Favor Fast Code option.


Optimize for Processor
This option tells the compiler which processor it should optimize for. Choices include:

  • Blended
  • Pentium
  • Pentium Pro, Pentium II, Pentium III
  • Pentium 4 and Above

Despite the use of Intel branding, the Visual Studio documenation indicates that choosing the Pentium 4 and Above option will also optimize for the AMD Athlon processor.

For mor information about the processor specific optimization see:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_.2f.g.asp


Optimize for Windows Application
Yes.





<< Previous

:: Index ::

Next >>