We are pleased to announce a four-day course to give a hands-on introduction to writing fast(er) code in Python.

We plan to hold this course on-site at ETH Zurich (OCT) on:

  • Tuesday 4th of October, 9:30 until 16:45
  • Thursday 6th of October, 9:30 until 16:45
  • Tuesday 11th of October, 9:30 until 16:45
  • Thursday 13th of October, 9:30 until 16:45

Breaks: All the days will have an hour of lunch break from 12:30-13:30 and two coffee breaks from 11:00-11:15 and 15:00-15:15, respectively.

The course will be held online if ETH Zurich reintroduces COVID-19 safety regulations.


The course requires some previous Python experience and will be suited for you if you can answer the following questions with "yes":

  • Have you been programming in Python for more than a year?
  • Have you ever experienced performance issues in your Python code?
  • Are you interested in running Python code on high-performance-compting clusters (such as ETH's Euler cluster)?

This course will introduce you to different techniques and tools which will help you tackle performance issues when writing Python code for running it on your local computer and/or on a high-performance-computing cluster.

This course is not an introduction to Python and does not offer a deep dive into the presented topics. Instead, we try to raise awareness of existing solutions and teach best practices so that participants can acquire the basic skills needed to tackle performance-related programming problems on their own.

Preliminary Course Layout

Tuesday 4th of October

  • General introduction

    • Fundamental concepts
    • Multicore computing and the global interpreter lock
    • A High-level introduction to computer architecture
  • Profiling

    • Tools to measure the speed of programs and to find the slow spots
    • Best practices

Thursday 6th of October

  • Concepts

    • Complexity of Algorithms
    • Caching and Memoization
    • Performance aspects of Python data structures
    • Sorting and Searching
    • Memory efficient data structures
  • Optimization

    • NumPy, SciPy and NumExpr
    • Just-in-time compilation using PyPy and Numba
    • Compiling Python code to C using Pythran
    • Extending Python code with C code using Cython
    • Using other compiled languages

Tuesday 11th of October

  • Optimization (continued)

    • NumPy, SciPy and NumExpr
    • Just-in-time compilation using PyPy and Numba
    • Compiling Python code to C using Pythran
    • Extending Python code with C code using Cython
    • Using other compiled languages
  • Parallel computing on a PC

    • Limits of parallelization: Amdahl's and Gustafson's laws
    • Multithreading using concurrent.futures
    • Multiprocessing using concurrent.futures
    • joblib
    • Shared memory and race conditions

Thursday 13th of October

  • Introduction to the Euler HPC Cluster

  • Parallel computing on an HPC cluster

    • Using ipyparallel
    • Using dask


  • We are offering this edition of the workshop only to the SIS subscription customers and to the shareholders of the Euler high-performance-computing cluster. Please ask your professor or PI if you are not sure about this.

  • Since the course requires previous Python experience, we offer a self-assessment script at https://gitlab.ethz.ch/sis/fast-python-workshop to help you to check if your Python knowledge is sufficient. You might need to log in to https://gitlab.ethz.ch to access the script.

  • Familiarity with the command line is helpful but not a must; we will provide a preparation script for this.

  • We support the users of WSL (Windows Subsystem Linux) on Windows 10, Linux, or macOS on an x86-64 or M1 arm architecture for this edition of the workshop. Regrettably, the workshop is not suited for you if you work on a fully managed computer; you will need administrative/root permissions to prepare your computer for the workshop.

Organization / Registration

The course is free of charge and only offered to SIS subscription customers and existing shareholders of the ETH's Euler computing cluster. These conditions may change for future editions of the workshop.

Before you apply, please work on the self-assessment script at https://gitlab.ethz.ch/sis/fast-python-workshop

The workshop is already full and the registration has been closed.

The course will be given by Dr. Gerhard Brauenlich, Dr. Tarun Chadha, Dr. Franziskus Liem, Dr. Franziska Oschmann and Dr. Uwe Schmitt from the Scientific IT Services.

In case of questions, contact Tarun Chadha.