description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: /Oi (Generate Intrinsic Functions) |
/Oi (Generate Intrinsic Functions) |
11/04/2016 |
|
|
fa4a3bf6-0ed8-481b-91c0-add7636132b4 |
Replaces some function calls with intrinsic or otherwise special forms of the function that help your application run faster.
/Oi[-]
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 intrinsic for more information on which functions have intrinsic forms.
/Oi is only a request to the compiler to replace some function calls with intrinsics; the compiler may call the function (and not replace the function call with an intrinsic) if it will result in better performance.
x86 Specific
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 the Za compiler option 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 intrinsic to create intrinsic functions, or function (C/C++) to explicitly force a function call.
-
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
-
Select the Configuration Properties > C/C++ > Optimization property page.
-
Modify the Enable Intrinsic Functions property.
- See xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.EnableIntrinsicFunctions%2A.
/O Options (Optimize Code)
MSVC Compiler Options
MSVC Compiler Command-Line Syntax
Compiler Intrinsics