Commit Graph

67 Commits

Author SHA1 Message Date
LamTrinh.Dev
b6239b8cee [docs] Update links to repositories moved to https://github.com/swiftlang/ 2024-07-22 12:22:43 -07:00
Jaesung
62ce892609 Modified code snippet in OptimizationTips.rst
The given code snippet assigns some value to the method: `doSomething()`, but it seems that it should be just in the form of method invocation.
2023-05-20 10:21:19 +09:00
Erik Eckstein
da0e769d62 docs: describe -Osize as the default optimization mode in OptimizationTips.rst 2023-04-20 22:02:18 +02:00
DevYeom
f0cc6df0da Fix indentation of sample code in rst files. 2022-08-25 09:20:57 +09:00
Josh Soref
0213f2dd88 Spelling docs (#42437)
* spelling: any

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: associated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: async

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: classes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: clonability

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: conspicuously

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: constituent

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: constraint

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: contains

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: definition

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: digestible

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: for

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: github

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: javascript

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: manually

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: much

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: multi

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: occasionally

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: outputs

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: overriding

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: partition

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: propagation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: protocol

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: quandary

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: redundant

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: responsible

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: right

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specifically

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: suppose

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: that

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: the

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: with

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-19 14:04:59 -07:00
Aayush
8dd91820fb Adding Syntax Highlighting
using `.. code-block:: swift` instead of `::` we can turn code into more prettier and legible form!
2022-03-25 12:31:11 -04:00
Teameh
dd8d95a680 Fix typo in OptimizationTips.rst
d is assigned to d, not the other way around
2021-01-27 16:52:12 +01:00
Robert Widmann
843b25bbc7 Merge pull request #34423 from valeriyvan/patch-2
Fix snippet in OptimizationTips.rst
2021-01-13 18:00:14 -08:00
Slava Pestov
c997016bc6 Update some docs to talk about 'main' instead of 'master'
Fixes https://bugs.swift.org/browse/SR-14015 / rdar://problem/72819056
2021-01-11 22:57:51 -05:00
Valeriy Van
441c3a151d Update OptimizationTips.rst
Fix snippet
2020-10-25 01:10:04 +02:00
Stephen Canon
9a4ca42e7c Replace "unchecked" arithmetic with "wrapping" in optimization guide. (#31463)
* Replace "unchecked" arithmetic with "wrapping" in optimization guide.

Previously, this section talked about "unchecked" arithmetic operations; that's not what &+ and friends are. They are wrapping operations with fully-defined behavior (unlike nsw llvm ops, which are actually "unchecked").

* Update docs/OptimizationTips.rst
2020-05-07 19:33:32 -04:00
Robert Widmann
d453eacc74 [Gardening] Apply Review Feedback 2020-04-09 16:02:51 -07:00
own2pwn
e927b55f48 Add steps to enable -Ounchecked compiler flag 2020-04-09 15:59:05 -07:00
David Ungar
f9ee5722fe fix underline length 2020-02-28 08:45:56 -08:00
Michael Gottesman
71fc5bd347 [opt-tips] Remove -Ounchecked and talk about WMO + 'internal' to reduce dynamic dispatch. (#30068)
* Remove reference to -Ounchecked.

* Add internal + wmo in reducing dynamic dispatch.

* Fix some grammar

Co-Authored-By: Brennan Saeta <brennan.saeta@gmail.com>

Co-authored-by: Brennan Saeta <brennan.saeta@gmail.com>
2020-02-26 16:36:26 -08:00
Michael Gottesman
457b5ddaf2 Add guidance about cost of var boxes being captured by an escaping closure. 2020-02-17 23:34:56 -08:00
Dave Lee
daadc3763d Minor syntax updates to OptimizationTips 2020-01-02 08:37:34 -08:00
Robert Widmann
d9d6457177 Merge pull request #19652 from ranunez/patch-1
Update OptimizationTips.rst with consistent colon syntax
2019-11-18 12:37:07 -08:00
Dimitris Apostolou
d84048e555 Fix typos 2019-02-11 08:33:47 +02:00
Vasilis Akoinoglou
aa2be30242 Update OptimizationTips.rst
Super-small typo fix
2019-01-18 12:10:37 +02:00
Ricardo Nunez
3a52e8e29c Update OptimizationTips.rst with consistent colon syntax
* Cleans up inconsistencies within the doc concerning inconsistent spacing with colons
* According to [most swift style guides](https://github.com/raywenderlich/swift-style-guide#spacing), the there should be no space to the left of the colon and one space to the right of the colon.
2018-10-01 15:57:40 -07:00
Zedd
1dcc8e020a class -> AnyObject 2018-09-18 16:12:55 +09:00
Miguel Salinas
6c8f2aa1b0 Add -Osize optimization documentation 2018-03-10 09:51:44 -06:00
pe-ter-
f875d1307b [docs] Rename isUniquelyReferencedNonObjC to isKnownUniquelyReferenced (#13633)
Because it has been removed in [3.0](https://github.com/apple/swift/blob/master/CHANGELOG.md#swift-30) (as a part of [SE-0125](https://github.com/apple/swift-evolution/blob/master/proposals/0125-remove-nonobjectivecbase.md))
2018-01-04 14:02:38 -08:00
Andrew Trick
df6e927147 Documentation: move the @_specialize discussion into
proposals/UnsupportedOptimizationAttributes.rst.
2017-05-19 12:59:49 -07:00
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
Abdullah Abanmi
7657d89996 Fixed typos. 2016-08-03 08:23:42 +03:00
Abdullah Abanmi
4e1f8f0049 Added explanation for Copy-on-Write to footnote 4. 2016-08-02 09:42:49 +03:00
Antonio Alves
cee7d90458 Update OptimizationTips.rst 2016-07-30 08:30:43 -07:00
Jordan Rose
b5003f4c48 Private members may not satisfy protocol requirements, ever. (#3842)
* Private members may not satisfy protocol requirements, ever.

...because by construction they can be invoked from outside of the
type.

Finishing up SE-0025 ('private' and 'fileprivate').

* Update docs and mark SE-0025 ('private' and 'fileprivate') as done!

There's still improvements we can make (see 508e825f), but the feature
is in place and should be working correctly.
2016-07-29 11:24:05 -07:00
Radek Pietruszewski
d1106c0782 Fixes typos in OptimizationTips.rst 2016-07-26 23:16:19 +02:00
Chris Lattner
9a82329116 Merge pull request #2229 from hitstergtd/hitstergtd-docfixes-2
[gardening] [docs] Properly capitalise 'swift' to 'Swift'
2016-04-17 15:29:07 -07:00
hitstergtd
1ccca9d0f0 [gardening] Properly capitalise 'swift' to 'Swift' 2016-04-17 20:53:48 +01:00
practicalswift
db452dcbe9 [gardening] "[ a, b ]" → "[a, b]" 2016-04-17 21:26:08 +02:00
Hitster GTD
d95921e5a8 [doc] Fix broken links, permanent redirects and Rust-related inconsistencies (#2220)
* Fix almost every broken link and perm redirect

- Fix Xref from OptimizationTips.rst to Specialization section in Generics.rst
to use Sphinx syntax instead of a direct link to GitHub
- Fix over 12 broken links and permanent redirects

* Fix Rust related inconsistencies and broken links

- Update to reflect Rust does not have three types of pointers anymore
- Replace broken links to deprecated Rust documentation with alternatives,
comparable references in new Rust documentation
2016-04-17 20:52:29 +02:00
Andrew Trick
8d10e04290 [docs] Fix a link to the Generics doc.
Most people aren't using sphinx to read the docs, so just slap a
github URL in place of a proper rst :ref:.
2016-04-14 14:56:49 -07:00
hitstergtd
b464548035 [docs] Doc and typo fixes (#2098)
* [docs] Doc and typo fixes

- properly hyphenate Objective-C
- replace *dynamicism* with *dynamism*

* [docs] Doc and typo fixes

- properly hyphenate Objective-C
- replace *dynamicism* with *dynamism*
2016-04-09 11:26:13 +02:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
practicalswift
72c57c060c [gardening] Fix recently introduced typo: "refererences accross" → "references across" 2016-04-05 21:27:44 +02:00
Arnold Schwaighofer
6cc8f68baa Add an optimization tip about the use of Unmanaged._withUnsafeGuaranteedRef 2016-04-04 11:46:29 -07:00
Manav Gabhawala
ae929ee61b [CHANGELOG][Docs] Update CHANGELOG and Docs to reflect new parsing of function parameter attributes like 'var', 'let' and 'inout' for SE-0003, SE-0031 and SE-0053 2016-03-29 17:06:23 -04:00
Andrew Trick
c38adb500e [docs] Update optimization tips considering the presence of @_specialize. 2016-03-28 15:38:33 -07:00
Andrew Trick
42db97f6cb [docs] Add OptimizationTips to the contents page. 2016-03-28 15:38:33 -07:00
practicalswift
4689a22f1b Replace left/right quotation marks with apostrophes in non-quote contexts
* LEFT SINGLE QUOTATION MARK (U+2018) → APOSTROPHE (U+0027)
* RIGHT SINGLE QUOTATION MARK (U+2019) → APOSTROPHE (U+0027)
2016-01-06 12:29:40 +01:00
ken0nek
fcd8fcee91 Convert [Cc]an not -> [Cc]annot 2015-12-23 00:55:48 +09:00
Ahmed Ibrahim
2b0bde9014 Capitalize struct name 2015-12-16 23:55:50 +02:00
Zach Panzarino
89921c5765 Fix errors in OptimizationTips 2015-12-04 01:43:05 +00:00
Chris Lattner
d9e9feabaf Remove use of "Dynamicism" 2015-12-03 15:28:52 -08:00
codester
e9b3b2e6f6 Fix Typos
Fixed spelling
2015-12-04 00:13:40 +05:30
Nadav Rotem
78ee82d4cc Replace the single backtick with a double backtick to fix the linux build. 2015-11-09 22:17:17 -08:00