24–27 Mar 2025
CERN
Europe/Zurich timezone
There is a live webcast for this event.

Exercise: Under the Hood of the Snake: Behind the scenes of Python

25 Mar 2025, 16:45
1h
31/3-004 - IT Amphitheatre (CERN)

31/3-004 - IT Amphitheatre

CERN

105
Show room on map

Speaker

Sten Astrand (Lund University)

Description

Python is one of the most used programming languages in scientific computing - yet when discussed, we often admonish: "Python is slow!"

What does that mean in practice? Does it depend on the use case? Most importantly: what is Python doing under the hood?

Let's put our fangs into the inner workings of Python. I will talk about its design and what "Python is slow" means, what we are comparing to, and when this matters. Through examples we will see these things in action - both where the language is limited, and where the limitation might be your code...

Python is very flexible, which comes with trade-offs compared to languages like C++. However, "slow" is not an absolute term. There are good practices that can be applied to speed up our programs, saving both time and computing resources. With the right techniques, we can learn to charm the snake!

Number of lecture hours 2
Number of exercise hours 1
Attended school CSC 2024 (Hamburg)

Author

Sten Astrand (Lund University)

Presentation materials