EuroSciPy logo


Cambridge, UK - 27-30 August 2014

High Performance Computing in Python

Ian Ozsvald

Thu 28 4 p.m.–5:30 p.m. in IFM


Python can be compiled to run much faster with relatively little effort. You'll learn how to make your code run a C-like speeds using three major technologies, each requiring varying degrees of effort. This course is for Intermediate Pythonistas who want to learn about profiling, Cython, Numba, Pythran and PyPy. First we'll recap line_profiler and memory_profiler (this will complement Yury's talk using a different code example) to identify slow code segments.

Next we'll learn to use Cython on a plain Python problem to achieve a very respectable C-like solution. We'll extend this to use numpy which will enable OpenMP multi-core parallelism.

We'll also use Continuum's Numba as a Just in Time compiler, showing how we can get great speed-ups for very little effort.

Finally we'll review Pythran and PyPy to see how two other tools let us achieve similar speed-ups and reviewing the different directions these tools are driving in.

By the end of the session you'll be able to identify bottlenecks in your code and you'll have 3 approaches to making them run at up to C-like speeds.

REQUIREMENTS: This tutorial will be hands-on, you'll need a recent Anaconda installation. To take part in the profiling exercises you should also install line_profiler and memory_profiler and pillow. Code samples will be handed out on a USB stick at the start of the class. You'll find these modules at: