Everything you need to know about Python 3.13 – JIT and GIL went up the hill

Python 3.13’s experimental just‑in‑time compiler and optional GIL‑free (“free‑threaded”) build are prompting debate over whether better multicore scaling is worth added complexity and slower single‑threaded performance. Commenters weigh the real‑world gains for workloads like machine learning, scientific computing, GUIs, and high‑throughput servers against longstanding workarounds using multiprocessing, C/Rust extensions, or alternative runtimes like PyPy. Many see the changes as necessary modernization for a multicore future, but worry about debugging new concurrency bugs, ecosystem breakage around C extensions, and the immature state of the JIT.

Free-threaded CPython & GIL Removal

  • Strong debate over removing the GIL: some expect more complexity, subtle bugs, and slower single-threaded code; others see it as necessary for a multicore future.
  • Many existing programs (including C extensions) implicitly rely on the GIL for thread safety; removing it risks race conditions and hard-to-debug issues.
  • A free-threaded build is seen as strategically important for scientific computing, ML, GUI apps, and workloads with large shared data where multiprocessing is too memory‑heavy.

Multithreading vs Multiprocessing

  • Several commenters say they’ve “never” hit GIL limits and happily use multiple processes (or even MPI) instead.
  • Others report regular pain points where multiprocessing overhead, data copying, and shared-memory problems make it inadequate.
  • ML and high-throughput inference (especially GPU-backed) are highlighted as domains where threads with shared memory are far superior to processes.

Performance & Correctness Concerns

  • Some claim no‑GIL builds are 20–50% slower for single-threaded code compared to older CPython, calling the tradeoff disappointing and politically driven.
  • Others point to public benchmarks showing ongoing overall speedups since 3.10 and argue the slowdown is expected early-stage cost that will be improved.
  • There is consensus that data races and memory unsafety like in C/C++ are unacceptable; Python’s refcounting especially cannot simply “ignore” races.

JIT in 3.13

  • JIT is experimental and off by default; current tier‑2 optimizer reportedly slows code ~20%, with JIT mostly regaining that loss.
  • Some want official binaries with JIT enabled to encourage real‑world testing; others argue forcing source builds is appropriate for such an alpha feature.

PyPy & Alternatives

  • PyPy’s mature JIT is praised and considered underused; some see CPython’s JIT as NIH duplication.
  • Major barrier: incomplete or slower compatibility with the CPython C API and widespread C extensions.
  • PyPy also still has a GIL; past attempts at STM and GIL removal stalled due to overhead and complexity.

Syntax, Tooling, and Miscellaneous

  • A side discussion argues over Python’s indentation-as-syntax; some wish for an end keyword for easier auto-formatting, others see braces/keywords as noise.
  • Packaging/binaries: Linux binaries are tricky due to libc and ecosystem diversity; users often rely on distros or third-party portable builds.