Why Do We Need Our Own Bytecode Machine?
summary
Backend for a flight-price search serving 3M queries/day across 700+ providers has half a gigabyte of config expressions that grow into ASTs with thousands of nodes, so a custom stack-based bytecode VM replaces recursive traversal and yields 2β10x raw speedups. An optimizing compiler adds constant folding and rewrites in-array checks to in-map checks, plus inlineable built-in macros; a small debugger shows bytecode and breakpoints. Benchmarks show ~2x win versus existing interpreters; static typing prevents invalid saved expressions.
AI-written summary Β· about
