Let's prototype a JavaScript JIT compiler!
Channel:Andreas Kling · Length:1:21:24 · Published:2023-10-11 · Views:49592
Summary
Andreas Kling live-codes a prototype JavaScript JIT compiler for the LibJS engine used in SerenityOS and Ladybird. He builds a standalone bytecode VM, a simple interpreter, and then a simple JIT in about 80 minutes.
Why HN recommends it
HN commenters cite it as a concrete example of how a skilled developer uses Copilot, mostly as fancy autocomplete for codebase-specific work.
He basically uses it as a fancy autocomplete. — HN, 2025
Compilers, interpreters & program analysis · Software practice, open source & careers
Subtitles (excerpt)
well hello friends welcome back to the program and welcome to my new computer Loft uh today we are going to work on something new and interesting maybe even a little bit exciting because uh lately I have been thinking a bunch about JavaScript performance and how it is one of the major suck areas of ladybird at the moment uh where we do indeed suck and we need to get better uh so in the last week or so I've been moving but I've also been um trying to squeeze performance out of our B code interpreter and there's still a lot of performance to be had but I'm also becoming very curious um how much performers were leaving on the table by not having a Justin Time compiler and um I've spoken many times about the um safety security tradeoffs um the safety security versus performance trade-offs if of just compilers in the past but I think dismissing them entirely was probably premature and uh I think it's an area worth exploring and um and I think the complexity of a jit compiler exists on a spectrum and I'm a little bit prejudiced because I've been around these very complicated optimizing jit compilers like JavaScript core and VA in the past and um there's a lot of surface area for bugs in those compilers but it is also possible to
On Hacker News
Ladybird is 425k LOC. Chromium is 3.5m LOC. Starting a new browser, using LLMs... Is not going to maintain enough context. Whilst Andreas does use Copilot a fair bit [0], he tends to do a line at a time, frequently disagree and rewrites his own, before prompting again. That is... He basically uses it as a fancy autocomplete. Not much else. [0] [VIDEO] — shakna, 2025-08
> The code is usually the same code I'd get a few web searches away My impression is that people normally don't use Copilot as a substitute for finding solutions (ChatGPT is much better for that), but as a way to help with otherwise tedious tasks that are really specific to your codebase. Check out 6:05 and 6:25 in this Andreas Kling video for a good example: [VIDEO] Regarding your second point C… — Kiro, 2023-11
The stuff Copilot helps me with is not the stuff SO could help me with. Check out 6:05 and 6:25 in this Andreas Kling video: [VIDEO] That's where Copilot shines, not for locating and copypasting answers from Stack Overflow. — Kiro, 2023-10
> Check out 6:05 and 6:25 in this Andreas Kling video for a good example: [VIDEO] Oof. So not only was it a poor replacement for a macro, it didn't even generate the correct code! — Nullabillity, 2023-11
Related videos
- Rich Harris - Rethinking reactivity · You Gotta Love Frontend · 36:45
- Lexical Scanning in Go - Rob Pike · GoogleFOSSSydney · 51:17
- William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC] · PapersWeLove · 1:31:05
- 🚀 TDD, Where Did It All Go Wrong (Ian Cooper) · DevTernity Conference · 1:03:55
- Bret Victor The Future of Programming · Joey Reid · 32:55
- "Uncle" Bob Martin - "The Future of Programming" · Paul Stringer's Mobile Tech · 1:18:21
- Tim Ewald - Clojure: Programming with Hand Tools · ClojureTV · 58:39
- CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17” · CppCon · 1:19:52
- Using Python to Code by Voice · Next Day Video · 28:17
- Clasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming · Google TechTalks · 57:37
- Transforming Code into Beautiful, Idiomatic Python · Next Day Video · 48:51
- Agile is Dead • Pragmatic Dave Thomas • GOTO 2015 · GOTO Conferences · 40:39
- Compiling C to printable x86, to make an executable research paper · suckerpinch · 25:41
- Break Me00 The MoVfuscator Turning mov into a soul crushing RE nightmare Christopher Domas · Adrian Crenshaw · 46:19
- Plover: Thought to Text at 240 WPM · Next Day Video · 34:21
- "The Economics of Programming Languages" by Evan Czaplicki (Strange Loop 2023) · Strange Loop Conference · 43:57