JIT in the Wild: CPython’s Next Step vs PyPy and V8 (With Real Benchmarks)

Petr

Petr

Day 2 • Sun, Oct 18
11:35 - 12:20
Location
R3
Language
English
Category • Level
Python Core • Medium

I’ll open up the internals of CPython’s emerging JIT direction and PyPy’s tracing JIT
— what each optimizes, what it assumes, and where those assumptions break.
The talk is benchmark-driven and compares five real-world execution paths side-by-side:
CPython, PyPy, V8 (JavaScript), plus Numba JIT and JAX JIT as practical “kernel compilers” Python users can apply today.
The format is interactive: the audience first guesses unlabeled performance curves, then we reveal results and explain why the curves look that way.

Description

“JIT” is not one thing
— it’s a family of tradeoffs between startup time, peak speed, memory footprint, and deoptimization risk.
In this talk we connect mechanism → measurements.

We start with runtime JITs and their philosophies:

  • PyPy: tracing JIT (traces + guards + aggressive specialization around hot loops)
  • CPython: modern execution pipeline (adaptive specialization today + an evolving JIT direction)
  • V8: tiered execution (fast baseline + optimizing tiers; speculation + deopts)

Then we add a pragmatic angle: Numba and JAX aren’t “Python runtime JITs”,
but they are the most widely used ways to JIT-compile numeric kernels on CPU (and beyond).
We benchmark them separately on kernels where they apply, and show how their speedups relate to compilation cost, shape constraints, and dispatch overhead.

Interactive segment:
I show multiple unlabeled warmup/throughput curves (runtime curves + kernel curves).
The audience guesses which engine produced which curve, then we unpack the reason.

Key message:
performance is a curve, not a number.
If you can read warmup and steady-state behavior, you can choose the right toolchain (runtime vs kernel compiler) with confidence.

Petr
Petr

I’m a CPython-internals specialist with 8+ years leading technical teams, evolving from ML systems work into CPython runtime research (GIL/noGIL, GC, allocators, bytecode). Since 2024 I’ve been a Lecturer at MIPT, where I designed three 15-module Advanced Python courses (OOP, async/parallelism, PVM, GC, noGIL, CPython source code), delivered 90+ classes to 140+ students, and mentored 13 students to conference-level research. Industry work includes building production Python systems: an RL trading platform with IB/Saxo connectors and Monte-Carlo risk models, and tooling that improved match accuracy 10× and reduced search time 800×; I also delivered ML/DTS analytics for a Saudi Aramco project.

Related Speeches