It is also very, very useful to do
cython -a file.pyx
and look at the generated .html file. The more yellow a line, the more Python C/API calls are made. This is "profiling" in a different sense, in that it profiles at compile time how likely a given line of code is to be slow. (Credit: This cython -a feature is something that my student, Robert Bradshaw, implemented.)