從熟悉 Python 到貢獻 CPython:第一個 PR 的切入指南

Peter

Petr
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.
“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:
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.

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.

Peter

scc

Xavier Yen (顏志穎)

Kalyan Prasad