Skip to content

Commit b39e552

Browse files
authored
Merge pull request swiftlang#15143 from Vercantez/patch-2
2 parents f01d84c + 6c8f2aa commit b39e552

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/OptimizationTips.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Enabling Optimizations
2121
======================
2222

2323
The first thing one should always do is to enable optimization. Swift provides
24-
three different optimization levels:
24+
four different optimization levels:
2525

2626
- ``-Onone``: This is meant for normal development. It performs minimal
2727
optimizations and preserves all debug info.
@@ -35,6 +35,8 @@ three different optimization levels:
3535
result in undetected memory safety issues and integer overflows. Only use this
3636
if you have carefully reviewed that your code is safe with respect to integer
3737
overflow and type casts.
38+
- ``-Osize``: This is a special optimization mode where the compiler prioritizes
39+
code size over performance.
3840

3941
In the Xcode UI, one can modify the current optimization level as follows:
4042

0 commit comments

Comments
 (0)