Building a JavaScript engine in the open.
How Quench went from a first commit to a TypeScript, JavaScript and WebAssembly runtime with an interpreter, two JITs and AOT. Measurements, diagrams, dead ends and what we learned.
Where Quench stands: JetStream 3 with the JIT off
Against Node and Bun with all JITs disabled, Quench sits between them on speed and well below both on memory. The full picture, including the tests where its memory is far too high.
read →3 × C + 6: an instruction budget for every JavaScript operation
Every primitive operation in Quench's interpreter now has a ceiling on the machine instructions it may execute, derived from the same operation written in C and enforced by a gate that only lets the number go down.
read →The JIT compiled the code and then never ran it
On 33 of 44 primitive operations our optimizing JIT was no faster than the interpreter. For many of them the reason was simple and embarrassing: the native code existed and nothing ever jumped to it.
read →Entry cells, exit descriptors and a collector without stack maps
Three small contracts decide how compiled JavaScript is called, how it gives up, and how the garbage collector finds its roots. Quench's versions are unusual, and this is the reasoning behind each.
read →JavaScript that looks like C should cost what C costs
We wrote eight small kernels twice, once in JavaScript and once in C, and counted. The results set the standard Quench's compiled code is now held to, and showed one benchmark that had never been compiled at all.
read →One interpreter, four outputs: Futamura projections in a JavaScript engine
Quench writes the meaning of each JavaScript operation once and derives the interpreter, a copy-and-patch JIT, an optimizing JIT and an AOT compiler from it. How that works, and an honest count of how far the code is from the design.
read →A 17.6% regression that was four deleted globals
Thirty hours of running JetStream 3 every ninety minutes took the interpreter from 0.61 to 0.90 of the best competing engine, then lost a sixth of it overnight. The bisect led somewhere unexpected.
read →AOT without a second compiler
We built a closed-world JavaScript-to-native compiler, measured it, and threw it away. Quench's ahead-of-time mode is the interpreter specialized to what is known at build time, and this is why.
read →Most optimizations do not survive measurement
Notes from a ledger of rejected changes. Superinstructions, inline allocation, tail-call conventions and a 33% win on one benchmark, all turned down, and the rule that turned them down.
read →Interpreter against interpreter: eight for eight, and the JIT that was not ready
With every engine's JIT turned off, Quench's interpreter led all eight classic V8 benchmarks. The same week its JIT trailed Node and Bun by 2 to 24 times. Both results are worth showing.
read →Your peak RSS depends on which CPU you ran on
The same binary reported peak memory anywhere from 2,436 to 2,824 KiB across 20 runs. Four things we learned about measuring a JavaScript engine's memory before we could trust a single number.
read →One 64-bit word, two narrow slots and three loads per field
How Quench represents values and objects, why an object reference is an index and not a pointer, and what that choice costs every time you read a field.
read →The day we deleted 405,013 lines
Quench's second runtime replaced the first in a single commit that removed 405,013 lines. This is how the rewrite was staged so that the cutover was boring.
read →We deleted our benchmark-specific fast paths
Our Richards score was good because the engine recognised the workload. We removed every path like that, took the lower numbers, and wrote the rule into the repository.
read →35,000 commits in a month
In August 2026 the repository took 35,083 commits, 4,217 of them in one day. Here is what that much parallel work built, what it broke, and what we changed so it could keep going.
read →4,367 class tests in two days, and what a skip list hides
Driving one test262 directory from 44 passing tests to all 4,367 taught us more about denominators than about classes.
read →Quench started as a TypeScript-to-Rust transpiler
The first commit was a compiler driver, not a JavaScript engine. Four names, one embedded engine and one deleted interpreter later, the project admitted what it was becoming.
read →Try it
Quench builds from source with Cargo and runs TypeScript, JavaScript and WebAssembly.
Build and runWork on it
Interpreter, JIT, AOT, GC, Node APIs. Every claim on this blog has a measurement you can rerun.
Where to startFollow it
New posts land here as the engine moves. Star the repository or subscribe to the feed.
Star on GitHub Feed