These advanced optimization choices appear if you click on the Advanced Optimizations
button on the Compile Properties tab, as shown in Figure 20.20.
FIGURE 20.20 Options for advanced optimization
Next you will see what these optimizations are intended to do.
Assuming No Aliasing
Removing Array Bounds Checks
Removing Integer Overflow Checks, Removing Floating-Point
Allowing Unrounded Floating-Point Operations, Removing Safe
Pentium FDIV Checks
WARNING - Advanced Optimizations: Activating
any advanced optimization turns off a built-in VB safety check. Although removing
these checks will speed program execution, the extra speed certainly isn’t
worth it if your programs crash. The basic optimizations are probably safe enough,
but you may want to heed the voice of conservatism when using the advanced optimizations:
• Don’t use them unless you absolutely must. Any optimization that
turns off a built-in safety check is another opportunity to ship a bug.
• You must remember to apply any necessary safety checks yourself. If you
don’t have time to conduct your own safety checks, refer to the punch line
of the first rule.