You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "-O Options (Optimize Code) | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "11/04/2016"
4
+
ms.date: "09/25/2017"
5
5
ms.reviewer: ""
6
6
ms.suite: ""
7
7
ms.technology:
@@ -22,47 +22,36 @@ caps.latest.revision: 11
22
22
author: "corob-msft"
23
23
ms.author: "corob"
24
24
manager: "ghogen"
25
-
translation.priority.ht:
26
-
- "cs-cz"
27
-
- "de-de"
28
-
- "es-es"
29
-
- "fr-fr"
30
-
- "it-it"
31
-
- "ja-jp"
32
-
- "ko-kr"
33
-
- "pl-pl"
34
-
- "pt-br"
35
-
- "ru-ru"
36
-
- "tr-tr"
37
-
- "zh-cn"
38
-
- "zh-tw"
39
25
---
40
26
# /O Options (Optimize Code)
41
-
The **/O** options control various optimizations that help you create code for maximum speed or minimum size.
42
-
43
-
-[/O1](../../build/reference/o1-o2-minimize-size-maximize-speed.md) optimizes code for minimum size.
44
-
45
-
-[/O2](../../build/reference/o1-o2-minimize-size-maximize-speed.md) optimizes code for maximum speed.
46
-
47
-
-[/Ob](../../build/reference/ob-inline-function-expansion.md) controls inline function expansion.
48
-
49
-
-[/Od](../../build/reference/od-disable-debug.md) disables optimization, speeding compilation and simplifying debugging.
50
-
51
-
-[/Og](../../build/reference/og-global-optimizations.md) enables global optimizations.
52
-
53
-
-[/Oi](../../build/reference/oi-generate-intrinsic-functions.md) generates intrinsic functions for appropriate function calls.
54
-
55
-
-[/Os](../../build/reference/os-ot-favor-small-code-favor-fast-code.md) tells the compiler to favor optimizations for size over optimizations for speed.
56
-
57
-
-[/Ot](../../build/reference/os-ot-favor-small-code-favor-fast-code.md) (a default setting) tells the compiler to favor optimizations for speed over optimizations for size.
58
-
59
-
-[/Ox](../../build/reference/ox-full-optimization.md) selects full optimization.
60
-
61
-
-[/Oy](../../build/reference/oy-frame-pointer-omission.md) suppresses the creation of frame pointers on the call stack for quicker function calls.
62
-
63
-
## Remarks
64
-
You can also combine multiple **/O** options into a single option statement. For example, `/Odi` is the same as `/Od /Oi`.
The **/O** options control various optimizations that help you create code for maximum speed or minimum size.
29
+
30
+
[/O1](../../build/reference/o1-o2-minimize-size-maximize-speed.md) sets a combination of optimizations that generate minimum size code.
31
+
32
+
-[/O2](../../build/reference/o1-o2-minimize-size-maximize-speed.md) sets a combination of optimizations that optimizes code for maximum speed.
33
+
34
+
-[/Ob](../../build/reference/ob-inline-function-expansion.md) controls inline function expansion.
35
+
36
+
-[/Od](../../build/reference/od-disable-debug.md) disables optimization, to speed compilation and simplify debugging.
37
+
38
+
-[/Og](../../build/reference/og-global-optimizations.md) enables global optimizations.
39
+
40
+
-[/Oi](../../build/reference/oi-generate-intrinsic-functions.md) generates intrinsic functions for appropriate function calls.
41
+
42
+
-[/Os](../../build/reference/os-ot-favor-small-code-favor-fast-code.md) tells the compiler to favor optimizations for size over optimizations for speed.
43
+
44
+
-[/Ot](../../build/reference/os-ot-favor-small-code-favor-fast-code.md) (a default setting) tells the compiler to favor optimizations for speed over optimizations for size.
45
+
46
+
-[/Ox](../../build/reference/ox-full-optimization.md) is a combination option that selects several of the optimizations with an emphasis on speed. It is a strict subset of the **/O2** optimizations.
47
+
48
+
-[/Oy](../../build/reference/oy-frame-pointer-omission.md) suppresses the creation of frame pointers on the call stack for quicker function calls.
49
+
50
+
## Remarks
51
+
52
+
You can combine multiple **/O** options into a single option statement. For example, **/Odi** is the same as **/Od /Oi**. Certain options are mutually exclusive and cause a compiler error if used together. See the individual **/O** options for more information.
Copy file name to clipboardExpand all lines: docs/build/reference/o1-o2-minimize-size-maximize-speed.md
+13-17Lines changed: 13 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "-O1, -O2 (Minimize Size, Maximize Speed) | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "09/22/2017"
4
+
ms.date: "09/25/2017"
5
5
ms.reviewer: ""
6
6
ms.suite: ""
7
7
ms.technology:
@@ -36,30 +36,29 @@ Selects a predefined set of options that affect the size and speed of generated
36
36
37
37
## Syntax
38
38
39
-
> /O1
39
+
> /O1
40
40
> /O2
41
41
42
42
## Remarks
43
43
44
-
The following table describes **/O1** and **/O2**.
44
+
The **/O1** and **/O2** compiler options are a quick way to set several specific optimization options at once. The **/O1** option sets the individual optimization options that create the smallest code in the majority of cases. The **/O2** option sets the options that create the fastest code in the majority of cases. The **/O2** option is the default for release builds. This table shows the specific options that are set by **/O1** and **/O2**:
45
45
46
-
|Option|Equivalent to|Comment|
47
-
|------------|-------------------|-------------|
48
-
|**/O1** (Minimize Size)|**/Og/Os/Oy/Ob2/Gs/GF/Gy**|Creates the smallest code in the majority of cases.|
49
-
|**/O2** (Maximize Speed)|**/Og/Oi/Ot/Oy/Ob2/Gs/GF /Gy**|Creates the fastest code in the majority of cases. (default setting for release builds)|
0 commit comments