Speeding Up Python with Free Threading and Mypyc - Jukka Lehtosalo @EuroPythonConference
Speeding Up Python with Free Threading and Mypyc - Jukka Lehtosalo  @EuroPythonConference
Uploaded August 2026 | Updated September 2026, 2 weeks ago
[EuroPython 2026 - S1 on 2026-07-17]
🎤 *Speeding Up Python with Free Threading and Mypyc by Jukka Lehtosalo*
🔗 https://ep2026.europython.eu/session/speeding-up-python-with-free-threading-and-mypyc

📝 Abstract:
It’s common to hear complaints about Python being slow. In this talk, I will show how to make _some_ Python programs dramatically faster by using Python 3.14’s free threading and ahead-of-time compilation to C extensions using the mypyc compiler, while staying entirely in Python (and CPython).

Free threading can deliver large speedups for CPU-bound code that can be adapted for parallel execution, while mypyc speeds up workloads that benefit from reduced interpreter overhead and that can use static typing. If each can give a 10x speedup in an ideal use case, can we get a “holy grail” 100x speedup by using both?

I’ll introduce several small examples inspired by real-world workloads, measuring and explaining what happens when you apply free threading, mypyc, or both. In practice, relatively few programs are perfect fits for both techniques at once, but when they are, you can get substantial gains. Having both tools available gives you options for attacking a wide range of performance problems.

Along the way, I’ll cover various bottlenecks you are likely to encounter while optimizing real-world workloads. These often limit performance scaling. I'll explain how to diagnose and improve allocation-heavy code and thread contention caused by reference counting, in particular.

---
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License: creativecommons.org/licenses/by-nc-sa/4.0
Speeding Up Python with Free Threading and Mypyc - Jukka LehtosaloSupporting Android and iOS in your Python package - Malcolm SmithEuroPython 2026 Highlights - Day 3Building a Smart Home Device with MicroPython - Michał KarzyńskiBinary Dependencies: Identifying the Hidden Packages We All Depend On - Vlad-Stefan HarbuzPyStories - First Time Speaking at EuroPython with Kayode OladapoWhere Do You Want The Next EuroPython To Be — Lysandros NikolaouPython Dicts: Past, Present, and Free-Threaded Future - Lysandros NikolaouEuroPython 2025 - Sponsor HighlightsEuroPython 2026 - Conference Opening 🎉Designing and Building Custom Keyboards ⌨️ with Python - Carlos A AranibarBreaking changes – not great, not terrible - Jan Musílek
EuroPython Conference |

Speeding Up Python with Free Threading and Mypyc - Jukka Lehtosalo

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER