From 456660cd3c96fce1c5104fb7effe861d6562aeef Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Wed, 5 Mar 2014 19:57:12 -0600 Subject: [PATCH] Last bit of unhandled PR review from #370 --- docs/scenarios/speed.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/scenarios/speed.rst b/docs/scenarios/speed.rst index 05130c8..0219cf3 100644 --- a/docs/scenarios/speed.rst +++ b/docs/scenarios/speed.rst @@ -68,8 +68,11 @@ C Extensions Cython ------ -With `Cython `_ you are able to write C and C++ modules for Python. It implements a superset of the Python language. -You are also able to call C-functions and realize declaration of variables and functions like in C. Here is an example: +`Cython `_ implements a superset of the Python language +with which you are able to write C and C++ modules for Python. Cython also +allows you to call functions from compiled C libraries. Using Cython allows +you to take advantage of Python's strong typing of variables and operations. +Here is an example of strong typing with Cython: .. code-block:: python @@ -121,9 +124,8 @@ This implementation of an algorithm to find prime numbers has some additional ke n = n + 1 return result - - -The only difference between the both algorithm is this part: +Notice that in the Cython version you declare integers and integer arrays for +to be compiled into C types while also creating a Python list: .. code-block:: python