Skip to content

Commit 8d10e04

Browse files
committed
[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:.
1 parent 787eaa3 commit 8d10e04

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docs/OptimizationTips.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,16 @@ Advice: Use @_specialize to direct the compiler to specialize generics
347347
----------------------------------------------------------------------
348348

349349
The compiler only automatically specializes generic code if the call
350-
site and the callee function are located in the same module. However, the programmer can provide hints to the compiler in the form of @_specialize attributes. See :ref:`generics-specialization` for details.
351-
352-
This attribute instructs the compiler to specialize on the specified concrete type list. The compiler inserts type checks and dispatches from the generic function to the specialized variant. In the following example, injecting the @_specialize attribute speeds up the code by about 10 times.
350+
site and the callee function are located in the same module. However,
351+
the programmer can provide hints to the compiler in the form of
352+
@_specialize attributes. For details see
353+
https://github.com/apple/swift/blob/master/docs/Generics.rst#specialization.
354+
355+
This attribute instructs the compiler to specialize on the specified
356+
concrete type list. The compiler inserts type checks and dispatches
357+
from the generic function to the specialized variant. In the following
358+
example, injecting the @_specialize attribute speeds up the code by
359+
about 10 times.
353360

354361
::
355362

0 commit comments

Comments
 (0)