Skip to content
HomeVideos
AllLongsCategoriesPlaylists
BooksBlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Brandt Bucher – A JIT Compiler for CPython

    encukou

    1 HN recommender · recommended in 3 months, 2023–2024

    YouTube

    47:51 · 14K views · Nov 15, 2023

    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.

    It is the go-to explanation of how CPython's JIT works and why its design is so simple.

    Software Engineering & LanguagesCompilers, interpreters & program analysisPython, Ruby & scripting languagesSoftware performance & optimization
    1. 34:21
      Plover: Thought to Text at 240 WPMNext Day Video109K views • 13 years ago
    2. 49:55
      How Python was Shaped by leaky Internals, Armin Ronacher, Flask frameworkВидео с мероприятий {speach!20K views • 10 years ago
    3. 1:14:32
      Building Your Own Dynamic LanguageStanford21K views • 18 years ago
    4. 1:15:46
      CppCon 2017: Matt Godbolt “What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid”CppCon178K views • 9 years ago
    5. 1:21:25
      Let's prototype a JavaScript JIT compiler!Andreas Kling49K views • 3 years ago
    6. 2:07:18
      Demo: Base language, compile-time executionJonathan Blow164K views • 12 years ago
    7. 1:01:37
      Compiling and Optimizing Scripting LanguagesGoogle TechTalks21K views • 17 years ago
    8. 1:02:44
      Chris Seaton @ VMSS16: JRuby+Truffle: Why it’s Important to Optimise the Tricky Partssoftdevteamuk5.1K views • 10 years ago
    9. 1:30:03
      C++Now 2018: Matt Godbolt “What Else Has My Compiler Done For Me Lately?”CppNow11K views • 8 years ago
    10. 1:15:09
      Cliff Click @ VMSS16: Bits of Advice For the VM Writersoftdevteamuk4.2K views • 10 years ago
    11. 1:12:02
      Java on a 1000 Cores - Tales of Hardware / Software CoDesignGoogle TechTalks23K views • 17 years ago
    12. 1:38:36
      Episode 1: A basic expression evaluatorImmo Landwerth (terrajobst)284K views • 8 years ago
    13. 1:54:00
      Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022CppCon277K views • 3 years ago
    14. 43:04
      "Stop Writing Dead Programs" by Jack Rusher (Strange Loop 2022)Strange Loop Conference468K views • 4 years ago
    15. 1:00:21
      CppCon 2019: Matt Godbolt “Compiler Explorer: Behind The Scenes”CppCon29K views • 7 years ago
    16. 42:44
      Armin Ronacher - A Python for Future GenerationsEuroPython Conference6.2K views • 9 years ago
    17. 1:35:12
      Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 2023CppNow71K views • 3 years ago
    18. 45:31
      Bruce Hauman - Developing ClojureScript With FigwheelClojureTV56K views • 11 years ago
    19. 1:00:40
      Dmitry Vyukov — Go scheduler: Implementing language with lightweight concurrencyHydra47K views • 7 years ago
    20. 46:10
      Understanding the Python GILDavid Beazley127K views • 14 years ago

    3 comments from Hacker News

    1. @vanderZwanJan 2024· in “Python 3.13 Gets a JIT”

      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 indirectly gives a glimpse into the process of getting this into Python through the exchanges during the Q&A discussion. One thing to especially highlight is that this copy-and-patch has a much, much lower implementation complexity for the maintainers, as a lot of the heavy lifting is offloaded to LLVM. Case in point: as of the talk this was all just Brandt Bucher's work. The implementation at the time was ~700 lines of "complex" Python, ~100 lines of "complex" C, plus of course the LLVM dependency. This produces ~3000 lines of "simple" generated C, requires an additional ~300 lines of "simple" hand-written C to come together, and no further dependencies (so no LLVM necessary to run the JIT. Also "complex" and "simple" qualifiers are Bucher's terms, not mine). Another thing to note is that these initial performance improvements are just from getting this first version of the copy-and-patch JIT to work at all , without really doing any further fine-tuning or optimization. This may have changed a bit in the months since, but the situation is probably still comparable. So if one person

      Strongly recommendsView on HN
    2. @acqqDec 2023· in “What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI”

      "Only 35% slower overall than LuaJIT" as per video from a month ago. No idea which kind of tests are these "overall" though. this video Slides (pg. 31 performance): [LINK]

      CitesView on HN
    3. @QemJun 2024· in “Copy-and-Patch: Fast compilation for high-level languages and bytecode (2020)”

      Yes. This is the algorithm chosen for the CPython JIT under development, scheduled for inclusion from 3.13 onwards. See this video

      CitesView on HN