An incremental approach to JIT construction
andsoitis
49 points
10 comments
October 24, 2026
Related Discussions
Found 5 related stories in 44.8ms across 3,874 title embeddings via pgvector HNSW
- A brief history of just-in-time: forty years of JIT work, from 1960–2000 gjvc · 72 pts · October 29, 2026 · 65% similar
- Relax: JIT compiler for Rust to reduce build times adamnemecek · 180 pts · November 11, 2026 · 55% similar
- Executable Archaeology: Reanimating the Heuristic Compiler (1961) and KBEmacs (1984) abrax3141 · 34 pts · October 28, 2026 · 46% similar
- Java's new AOT cache feature is in a rough state theanonymousone · 91 pts · October 26, 2026 · 45% similar
- JIT bitmap text rendering for microcontrollers dmit · 95 pts · November 08, 2026 · 45% similar
Discussion Highlights (3 comments)
noelwelsh
Really cool. I haven't read it but I'm familiar with some of the authors so I expect this to be good.
gopalv
This is a great example of going from AOT to JIT specializing function calls by types. I assume this intended at a class which has already finished writing an AOT compiler and wants to build faster functions than you can derive at a compile time. > On the first call to a function, the compiler calls compile_me, which reconstructs argument types from their tag bits and builds a temporary type environment. The function body is then optimized using those concrete argument types. It's been two decades since I have worked on Rhys's brilliant libjit and the work that came before it[1], but the first-call recompilation can mix well with a byte code interpreter as well. You still need to be able to JIT a whole function with the first-call recompiler here, but you can do even more incremental if you are pairing it with an interpreter which gets to pick up the slack of the JIT. For example, with an interpreter, I could JIT about ~15% of a function and incrementally implement one opcode at a time without handling the complex ones on day one. The switch loop with direct threading can jump into a JIT block or the next instruction's compiled location, in identical fashion. So you get to operate register to register for adjacent instructions being JIT'ed together, but write back to heap for the interpreter to take over for an unsupported one. This is referred to as unrolling in the impl there, because what it really does is partially unroll the for(op in ops) loop and skip the jump to the top when you see a sequence of ops which you can line up together and JIT once. [1] - https://mirror.linux.org.au/pub/linux.conf.au/2003/papers/Rh... [2] - https://docs.rs/gnu-libjit/latest/gnu_libjit/struct.Function...
so-cal-schemer
I'm very interested in reading this and checking out the associated course site. Also, I'm taking opportunities to link to relevant sections in SICP, so some suggested reading: 5.5 Compilation https://sarabander.github.io/sicp/html/5_002e5.xhtml#g_t5_00...