Cython gives us a wonderful tool to quickly find the slow spots due to the Python interpreter—a feature called annotated view. We can turn on this feature by compiling a Cython file with the
-a option, using the following command line. Cython will generate a HTML file containing our code annotated with some useful information:
$ cython -a cevolve.pyx $ google-chrome cevolve.html
The HTML file displayed in the following screenshot shows our Cython file line-by-line:
Each line has a background color in different shades of yellow; an intense color means that the code has a lot of interpreter-related calls, while white lines gets translated ...