Category 02

Concurrency

What is actually parallel, and what the scheduling costs. Threads, the GIL, free threading, asyncio, subinterpreters and processes.

Entries
2
Series
1
  • The Real Cost of an async Call

    Awaiting a coroutine that never suspends costs 53 ns against 24 ns for a plain call. Wrapping the same coroutine in a Task and awaiting it costs 28,958 ns.

  • The GIL Is Not a Lock on Your CPU

    Eight threads of pure-Python arithmetic run at 0.98x the speed of one. The same eight threads doing IO run at 7.90x. The GIL is a scheduler, and it has a dial.

Arrow keys to move, Enter to open.