International
The Morning Dev

Only the news worth knowing

‹
 
Talk Python To Me cover

🎧 Talk Python To Me · Python

#570: Free-Threaded Python

· 62 min

Listen now · Talk Python To Me

#570: Free-Threaded Python

0:00−1:01:49
Speed

In this episode

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 p…

Full show notes ↗