/Oi | Enable intrinsic functions. This is enabled automatically for /Ox and /O2, but not for /O1. However, any code size increase from /Oi is likely to be very slight, so it is recommended even if you want small code and specify /O1. |
/O2 | All speed optimization. The compiler performs all optimizations, including automatic inlining at the compiler's discretion. This usually produces faster code than /Ox, but sometimes at the cost of much larger code size. And occasionally the code may run more slowly. It is advisable to compare the size and speed of an application compiled with /O2 to its size and speed when compiled with /Ox before making a final choice. |
/J | Treat "plain" char as being unsigned. This can produces somewhat faster code in applications that manipulate values of type char frequently. However, some applications may depend on the default setting that treats char as signed in order to operate correctly. Highly portable code does not depend on whether char is treated as signed or unsigned. |
/Op | Accept some loss of floating-point precision in favor of faster code. Allows the compiler to generate code to multiply by a reciprocal instead of doing a divide, and use mathematical identities and some expression reordering to compute a result more quickly, even though the result may differ slightly from what would be produced by following the ANSI C rules for expression evaluation. |
/QAgq | granularity quadword. Specifies that all data may be accessed in units of "quadwords" (8-byte units beginning on 8-byte address boundaries). Multi-threaded applications may not operate correctly with this option, and so the default is /QAgl "granularity longword" (4-byte granularity). But single-threaded applications will operate correctly with quadword granularity, so the use of /QAgq is suggested for single-threaded applications since the code will be somewhat faster and smaller. |
/QAieee0 | IEEE floating point NaNs, Infinities, and denormals are not supported in the compiled code. Underflows are quickly forced to zero, and the use of a NaN or Infinity raises an exception. This is the default value, and should be used for all applications except those which require IEEE-compliant floating point exception behavior, since it produces the fastest execution speed. Runtime library routines may still produce NaNs and denormals, however, so the use of _matherr to handle those situations is recommended. If an application does require support for IEEE NaNs and denormals, /QAieee_should_be_used. |