Terminal project · 4 lessons · Free
Build a JIT compiler
Build a runtime that translates a filter to WebAssembly and falls back to an interpreter without counting a row twice.
Get the course on GitHubWhat you’ll build
Write a stack interpreter, generate a WebAssembly predicate, and resume on the correct row when a missing value interrupts compiled execution. Use local timings to fit a policy that chooses when to compile.
Take either course on its own. Finish this project and Build a live query engine to compare a fixed compilation rule with a policy fitted on your machine. In the live query course, use node lab.mjs compare --worked to see the author’s example.
Before you start
Bring a terminal, Git and Node.js 22 or newer. You’ll use JavaScript functions, arrays and objects. The course runs locally without packages or an API key.
Clone and start
Clone the repository, then create a branch from this course edition so you can commit your progress.
git clone https://github.com/itsHabib/free-to-learn.git
cd free-to-learn
git switch -c my-jit-compiler 5aba89ddd86ebe14ef084a888a783fa5c6ff632c
cd courses/jit-compiler
node lab.mjs init
node lab.mjs demo --worked
node lab.mjs readerAlready taking the other course? Stay on the branch with your work. Skip the clone and branch commands, enter this course’s directory from the repository root, then run the Node commands.
Open the local address printed by the reader and start with lesson 01. Edit the starter in work/. Each lesson shows its check command and how to record your prediction. See the course README for forking and continuing on another machine.