After using the profiler to look at the right piece of code, an important part of the process when optimising with Cython is:<p>cython -a module.pyx &amp;&amp; open module.html<p>the -a command produces an annotated html file, which lets you see how Cython is compiling your Python into C. There&#x27;s a colour coding to give you an indication of which bits are fully typed and being translated directly, and which parts are hitting the CPython API at run-time (and hence will be slow).