Cython will bring the speed of your programs to another level. Cython programs are much easier to maintain in comparison to C, thanks to the tight integration with Python and the availability of profiling tools.
In this chapter, we introduced the basics of the Cython language and how to make our programs faster by adding static types. We also learned how to work with C arrays, NumPy arrays, and memoryviews.
We optimized our particle simulator by rewriting the critical
evolve function, obtaining a tremendous speed gain. Finally, we learned how to use the annotated view to quickly spot interpreter related calls and how to enable
cProfile for Cython scripts.
In the next chapter, we will learn the parallel processing basics and see how to write ...