Record nogil Performance: Peak Speedup Factors

The highest documented speedups with `nogil` often reach 'orders of magnitude' or 'nearly two orders of magnitude', with specific examples showing 50x to 100x faster execution for CPU-bound numerical algorithms and tasks like Fibonacci number generation.

The top 3

  1. Top Numerical Speedup: 80x for Python Loops: Cython's `nogil` blocks, combined with static typing, have achieved over 80 times speedup for computationally intensive Python for-loops by compiling them to highly optimized C code that executes without the Global Interpreter Lock.
  2. I/O Performance Boost: 10x with `nogil` Fork: An experimental `nogil` fork of CPython 3.9 demonstrated a 10x speed improvement for multi-file I/O operations, significantly boosting performance in I/O-heavy Python programs by allowing threads to run concurrently without GIL contention.
  3. CPython 3.14's Leap: ~4x Multi-Core Speedup: The experimental `no-GIL` build of CPython 3.14 has shown a near-linear 4x speedup on CPU-bound tasks when utilizing 4 threads, effectively closing much of the multi-core performance gap with languages like Rust.

Sources

Open the full topic