Python 3.13: no-GIL threading and JIT compiler prototype
Posted by Ganesh Vinayak · 2025-07-21
Python 3.13 ships experimental free-threading (no GIL!) and a JIT compiler prototype. True parallelism in Python is no longer a dream. Early benchmarks show 2-4x speedup on multi-core workloads. https://github.com/python/cpython
# Python 3.13 — free-threading (no GIL)
import threading
import time
def cpu_work(n):
total = 0
for i in range(n):
total += i * i
return total
# With free-threading, these actually run in parallel!
threads = [threading.Thread(target=cpu_work, args=(10_000_000,)) for _ in range(4)]
start = time.time()
for t in threads: t.start()
for t in threads: t.join()
print(f'4 threads: {time.time() - start:.2f}s') # ~1s vs ~4s with GIL