Using the Compiler to Optimize Your Code
The effect of the optimization options (on the Compile tab of the Project Properties dialog box and in the Advanced Optimizations dialog box) on how C2.EXE and LINK.EXE are driven is summarized in Table 7-4 (for building a standard EXE).
Obviously, -G6 means favor the Pentium Pro.
Notice that most of the switches have no effect on how C2 or LINK are started (although the EXE size changes so that we know the option is making itself known!). Since most switches have no effect, we must assume they are being acted on within VB6.EXE itself (as it seems to contain the compiler's first pass). Or perhaps the mystery files shown earlier (VB603389GL, VB603389SY, VB603389EX, VB603389IN, and VB603389DB) have some way of influencing the code generator, thus sidestepping our efforts to understand how the process is being controlled.
Table 7-4 The Compiler Effect
| Optimization Option | C2.EXE Effect | LINK.EXE Effect |
| Optimize For Small Code | None | None |
| Optimize For Fast Code | None | None |
| Favor Pentium Pro | /G6 (from G5) | None |
| Create Symbolic Debug Info | /Zi | /DEBUG |
| /DEBUGTYPE:CV | ||
| Assume No Aliasing | None | None |
| Remove Array Bounds Checks | None | None |
| Remove Integer Overflow Checks | None | None |
| Remove Floating Point Error Checks | None | None |
| Allow Unrounded Floating Point Operations | None | None |
| Remove Safe Pentium(tm)FDIV Checks | /QIfdiv Removed | None |