
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
This course contains the use of artificial intelligence. The curriculum, the code, the experiments, and the explanations were designed, reviewed, and verified by the instructor, and every result on screen comes from code run on a real machine.
Our computer has many cores, but a typical Python program uses only one. This course is about putting the others to work and understanding what really happens when Python does many things at once.
The course starts from a single object in memory all the way to every core of the machine:
Memory management. What an object really is and what it costs in bytes, how Python counts the references to it, the exact moment it dies, immortal objects, reference cycles and the garbage collector, weak references, slots and tracemalloc.
Threads and the GIL. Threads that wait and threads that compute, the Global Interpreter Lock at work on a timeline of who ran when, race conditions created on purpose, locks and deadlocks, queues, and the ThreadPoolExecutor.
Free-threaded Python. The same experiments without the GIL: what gets faster, what the built-in types still guarantee, how Python protects its reference counts without the lock, and when the GIL comes back.
Multiprocessing. Processes and the ways to start them, the __main__ guard, pools and the ProcessPoolExecutor, the real price of a process and of pickling, queues, shared arrays, shared memory and managers.
Subinterpreters, and how to choose. Several interpreters inside one process with interpreters and the InterpreterPoolExecutor, their current limits, and finally every tool side by side on the same workload, with a decision guide to take with you.
Every claim in this course is measured in a notebook, and all the code is yours to run on your own machine. Your numbers will differ from the ones on screen, because every machine is different, but the shape of the results will not.
The course mixes three kinds of lecture: slides that open and close each chapter, notebooks where the code is written and run step by step, and animations that show what happens inside the machine, where no notebook can reach.
Everything is recorded on Python 3.15, with the standard and the free-threaded build installed side by side. Whenever something depends on the version, the course says so out loud.