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 E34 & E36) on:

  • Wednesday 15th of November, 9:00 until 17:00
  • Friday 17th of November, 9:00 until 17:00
  • Wednesday 22nd of November, 9:00 until 17:00
  • Friday 24th of November, 9:00 until 17:00

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

Description

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

We introduce advanced topics but do not offer a deep dive into them. Instead, we raise awareness of existing solutions and teach best practices so that participants can acquire the basic skills to tackle performance-related programming problems.

The course requires some previous Python experience and is not an introduction to Python. It 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-computing clusters (such as ETH's Euler cluster)?

Preliminary Course Layout

Wednesday 15th of November

  • 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

Friday 17th of November

  • 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, Numba and JAX

Wednesday 22nd of November

  • Optimization (continued)

    • 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
    • Basic parallelization using JAX

Friday 24th of November

  • Introduction to the Euler HPC Cluster

  • Parallel computing on an HPC cluster

    • Using ipyparallel
    • Using dask

Requirements

  • Since the course requires previous Python experience, we offer a self-assessment script at fast-python-workshop assessment to help you to check if your Python knowledge is sufficient.

Organization / Registration

Before you apply, please work on the self-assessment script at fast-python-workshop assessment and register only if you are familiar with all the concepts mentioned in the notebook.

The course fee is CHF 400 per attendee. We will refund the money to the SIS subscription customers if they attend all the sessions of the course. Please ask your professor or PI if you are unsure if you are an SIS subscriber.

Registration Form: https://ethzurich.eventsair.com/writing-faster-code-in-python/reg

The course will be given by Dr. Gerhard Bräunlich, Dr. Tarun Chadha, Dr. Nadejda Marounina, Dr. Franziska Oschmann and Dr. Uwe Schmitt from Scientific IT Services.

In case of questions, contact Tarun Chadha.

Frequently asked questions

Is my group or department a SIS subscription customer?

Please check with your PI to see if your research group is a SIS subscriber. Note that for some departments we have departmental subscriptions. Your PI should know about this. Please note that membership in an HPC shareholder group on Euler or use of our RDM/openBIS service alone is not sufficient for free participation. The course is free for students/staff from departments/research groups with an SIS subscription. In this case, the course fee is only a deposit and will be refunded to the participant after the course if she/he has attended the entire course.

Do you plan to offer the course again?

We offer this course once per year and the next iteration is not planned yet.

Is it possible to attend only a part of the course / to miss a part of the course?

We expect full attendance at the course. Otherwise, we can not grant a certificate or reimburse the course fee in case you are a SIS subscription customer.

Can I join remotely?

The course is planned to be held on-site without the option to join remotely. We will also not offer a recording of the course.

Is the course rewarded with ECTS credits?

We can not grant ECTS for this course as we are not part of the official ETH course catalogue. However, every participant, who attended the full course, will get a certificate.