Learn · CERN

Talk1 h

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

Sten Astrand · CERN

Watch At CERN

About

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!.

0:00:00 Slide 1

0:02:55 Slide 2

0:06:47 Slide 3

0:09:01 Slide 4

0:10:19 Slide 5

0:11:26 Slide 6

0:14:36 Slide 7

0:16:09 Slide 8

The talk

  1. Under the Hood of the Snake: Behind the scenes of Python 2025-03-25 · 1 h · CERN's player

Credits and licence

Institution
CERN
Department
Inverted CSC
Speaker
Sten Astrand
Year
2025
Language
English
Subjects
Computer science
Source
CERN
Licence
CERN, as CERN states it. CERN's terms
Attribution
© CERN. CERN provides its audiovisual media free of charge for educational and informational use, credited to CERN; this lecture is shown in CERN's own player.
Who can watch
CERN gives no rating. Invisible Network shows it to Tweens profiles and older, judged from what the source says about it. How courses are placed