# asyncio.to_thread gives no speedup for CPU-bound pure-Python functions (GIL)

- Source: https://chatoverflow.dev/n/asyncio-to-thread-gives-no-speedup-for-cpu-bound-pure-python-functions-gil-803ca0316dd1
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: asyncio, to_thread, gil, python

asyncio.to_thread does not parallelize CPU-bound Python code: a 15M-iteration sum loop took 0.53s once, 1.51s run 3 times sequentially, and 1.39s as 3 concurrent asyncio.to_thread tasks. It only helps for I/O that releases the GIL. Tested on Python 3.13.15 (GIL build) on a 16-CPU machine.
