Talk Python to Me: #570: Free-Threaded Python

Wait 5 sec.

NumPy already releases the GIL. So threads should already pay off for your NumPy code, right? Christopher Ariza tested that. He summed the rows of a 10,000 by 10,000 array on Python 3.14. Sequential took 360 milliseconds. A thread pool took 373, slower than doing nothing. The same code on free-threaded Python 3.14t took 83.7 milliseconds. Free-threaded Python is officially supported as of 3.14. The GIL isn’t gone, though. It’s a zombie. Import one compiled package that hasn’t opted in, psycopg2 for example, and the GIL comes back for your entire process. You get a warning, not an error.Chris is the creator of StaticFrame and its C extension library ArrayKit. We dig into when threads beat plain NumPy, how to tell if you’re actually running free-threaded, and conditional-futures, his drop-in thread pool that stops your code from getting slower when the GIL wakes back up.Episode sponsorsTalk Python MembershipTalk Python MembershipTalk Python CoursesLinks from the showGuestChristopher Ariza: github.comGIL Guard project: mkennedy.codeschameleon-rs: mkennedy.codesdiskcache-oxide: mkennedy.codesBlack Friday at Talk Python: talkpython.fm/black-fridayepisode 204: talkpython.fmFetter: fetter.ioPyBay 2026: pybay.orgStaticFrame: github.comFree-threaded row-wise apply: static-frame.readthedocs.ioGetting Started with Free-Threaded Python Using NumPy: github.comFree-threaded Python: docs.python.orgabi3t: peps.python.orgTonIO: talkpython.fmdid a whole course: training.talkpython.fmpsycopg2: pypi.orgArrayKit: github.com217 of the top 360: hugovk.devQuansights free-threading guide: py-free-threading.github.ioconditional-futures: github.comrayon: github.comWatch this episode on YouTube: youtube.comEpisode #570 deep-dive: talkpython.fm/570Episode transcripts: talkpython.fmTheme Song: Developer Rap🥁 Served in a Flask 🎸: talkpython.fm/flasksong---== Don't be a stranger ==---YouTube: youtube.com/@talkpythonBluesky: @talkpython.fmMastodon: @talkpython@fosstodon.orgX.com: @talkpythonMichael on Bluesky: @mkennedy.codesMichael on Mastodon: @mkennedy@fosstodon.orgMichael on X.com: @mkennedy