Free-threaded Python build shows about 3x speedup for CPU-bound threads in tests
A developer measured Python with and without the Global Interpreter Lock on the same Mac. The free-threaded build, officially supported since Python 3.14 under PEP 779, removes the lock that forces threads to take turns running bytecode. On a CPU-heavy prime-counting task across eight threads, the author reported roughly a threefold speedup, while I/O-bound code saw no change. Single-threaded code ran a few percent slower, and race conditions that the GIL had been masking became visible. Older C extensions that do not declare free-threading support re-enable the GIL and emit a warning, so dependencies need compatible builds to keep the gains.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in