Brandt Bucher – A JIT Compiler for CPython
Channel:encukou · Length:47:50 · Published:2023-11-15 · Views:14098
Summary
Brandt Bucher presents his prototype JIT compiler for CPython at the 2023 Core Developer Sprint. He explains the copy-and-patch approach, the implementation and its performance.
Why HN recommends it
It is the go-to explanation of how CPython's JIT works and why its design is so simple.
I recommend that people watch Brandt Bucher's "A JIT Compiler for CPython" from last year's CPython Core Developer Sprint[0]. — HN, 2024
Python, Ruby & scripting languages · Software performance & optimization · Compilers, interpreters & program analysis
Subtitles (excerpt)
All right, it's time! Here's Brandt with his talk! [applause] [Brandt] All right, so, instead of giving this talk tomorrow… By the way, can everyone hear me? Okay, cool. So, instead of giving this talk tomorrow I'm giving it today. I'm going to be sharing a little bit about something I have been thinking quite a bit about for last few months which is what Python's future JIT compiler might look like. Or, CPython's future JIT compiler, specifically. So I'm going to start with some background and this will also be good background for Ken's talk immediately after this, on optimizations that we hope to perform. Specifically, I'm mostly going to be talking about some experiments that I've done with actually generating and executing machine code, not necessarily optimizations and things that happen in the meantime. However, I will be giving some background on that because I think it's really helpful for understanding how everything ties together. So, a little recent history: In CPython 3.11, one of the headline features was the specializing adaptive interpreter. This delivered really good speedups; I think the number we quoted most widely was something like 25%. If you want to take that at face value, that
On Hacker News
You're right, and in this case "foundational work" even undersells how minimal this work really is compared to the results it already gets. I recommend that people watch Brandt Bucher's "A JIT Compiler for CPython" from last year's CPython Core Developer Sprint[0]. It gives a good impression of the current implementation and its limitations, and some hints at what may or may not work out. It also… — vanderZwan, 2024-01
Yes. This is the algorithm chosen for the CPython JIT under development, scheduled for inclusion from 3.13 onwards. See [VIDEO] — Qem, 2024-06
"Only 35% slower overall than LuaJIT" as per video from a month ago. No idea which kind of tests are these "overall" though. [VIDEO] Slides (pg. 31 performance): [LINK] — acqq, 2023-12
Related videos
- RSA ANIMATE: Language as a Window into Human Nature · Royal Society of Arts · 10:53
- Why Are You So Angry? Part 1: A Short History of Anita Sarkeesian · Innuendo Studios · 9:35
- The Marvel Symphonic Universe · Every Frame a Painting · 13:35
- Confessions of a Converted Lecturer: Eric Mazur · UMBCtube · 1:20:08
- Interactive notebooks ~ Pluto.jl | Fons van der Plas | JuliaCon 2020 · The Julia Programming Language · 23:37
- A Better Default Colormap for Matplotlib | SciPy 2015 | Nathaniel Smith and Stéfan van der Walt · Enthought · 19:08
- Geoffrey West on COMPLEXITY · FQxI · 40:50
- 4 2 1 Christopher Domas The future of RE Dynamic Binary Visualization · Adrian Crenshaw · 48:39
- Stanford Seminar: Beyond Floating Point: Next Generation Computer Arithmetic · Stanford Online · 1:31:28
- "Performance (Really) Matters" with Emery Berger · Association for Computing Machinery (ACM) · 1:04:47
- "Performance Matters" by Emery Berger · Strange Loop Conference · 42:15
- The Ingenious Design of the Aluminum Beverage Can · engineerguy · 11:39
- Pure Functional Programming in Excel • Felienne Hermans • GOTO 2016 · GOTO Conferences · 43:16
- Plover: Thought to Text at 240 WPM · Next Day Video · 34:21
- Ruby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich · Confreaks · 53:21
- The spelled-out intro to neural networks and backpropagation: building micrograd · Andrej Karpathy · 2:25:52