Skip to 0 minutes and 12 secondsWelcome to the week 3 of high-performance computing with Python! Last week we discussed how numerical computing can be done more efficiently by giving away some of the dynamism of Python lists in favour of more static NumPy arrays. Even though using NumPy can in many cases greatly enhance the Python performance, in some cases using only NumPy is not enough, or one is processing other than numeric data. In this week we discuss Cython, which is an optimising static compiler for Python. Cython provides also an extended version of Python programming language by introducing static type declarations. Cython allows thus once more to trade some flexibility of pure Python for better performance.

Skip to 1 minute and 2 secondsThe ultimate way to improve the performance of Python programs is to implement the most time critical parts with more performant language, such as C, C++ or Fortran. In the end of the week we discuss how to interface Python with such a compiled code.

Welcome to week 3

Performance of Python programs can be improved a lot by utilizing compiled code.

In this week we discuss how pure Python code can be easily converted to a more static Cython code which has typically superior performance. We present also how code written in C/C++ or Fortran programming languages can be used from Python.

Share this video:

This video is from the free online course:

Python in High Performance Computing

Partnership for Advanced Computing in Europe (PRACE)