/Oi (Generate Intrinsic Functions)
| Overview | How Do I | Compiler Options
Feature Only in Professional and Enterprise Editions Code optimization is supported only in Visual C++ Professional and Enterprise Editions. For more information, see .
This option replaces some function calls with intrinsic or otherwise special forms of the function that help your application run faster. Programs that use intrinsic functions are faster because they do not have the overhead of function calls, but may be larger because of the additional code created. See #pragma intrinsic for related information.
To find this option in the development environment, click Settings on the Project menu. Then click the C/C++ tab, and click Optimizations in the Category box. Under Optimizations, click Customize.
x86 Specific
This option replaces the following function calls with their intrinsic (inline) forms:
_disable | _outp | abs | memset |
_enable | _outpw | fabs | strcat |
_inp | _rotl | labs | strcmp |
_inpw | _rotr | memcp | strcpy |
_lrotl | _strset | memcpy | strlen |
_lrotr |
Note The _alloca and setjmp functions are always generated inline; this behavior is not affected by /Oi.
The floating-point functions listed below do not have true intrinsic forms. If you use the Generate Intrinsic Functions option, the listed functions are replaced with versions that pass arguments directly to the floating-point chip rather than pushing them onto the program stack:
acos | cosh | pow | tanh |
asin | fmod | sinh |
The floating-point functions listed below have true intrinsic forms when you specify both /Oi and /Og (or any option that includes /Og: /Ox, /O1, and /O2):
atan | exp | sin |
atan2 | log | sqrt |
cos | log10 | tan |
The intrinsic floating-point functions do not perform any special checks on input values and so work in restricted ranges of input, and have different exception handling and boundary conditions than the library routines with the same name. Using the true intrinsic forms implies loss of IEEE exception handling, and loss of _matherr and errno functionality; the latter implies loss of ANSI conformance. However, the intrinsic forms can considerably speed up floating-point intensive programs, and for many programs, the conformance issues are of little practical value.
You can use Improve Float Consistency (/Op) or Disable Language Extensions (/Za) to override generation of true intrinsic floating-point options. In this case, the functions are generated as library routines that pass arguments directly to the floating-point chip instead of pushing them onto the program stack.
END x86 Specific
You also use #pragma intrinsic to create intrinsic functions, or #pragma function to explicitly force a function call.