A Fast In-Place Interpreter for WebAssembly
summary
Builds a handwritten-assembly in-place interpreter for WebAssembly called Wizards using Virgil and shows it runs as fast as many rewriting interpreters while using far less memory. The key data: a constant-time side table adds ~0.3 output bytes per input byte, value tags cost ~8–10% of runtime, threaded dispatch yields up to ~40% speedup, shrinking dispatch entries to 4 bytes gives ~5% benefit, and interpreters remain roughly an order of magnitude slower than optimizing compilers but beat compilers for short-lived code.
AI-written summary · about
chapters (12)
- 0:00The history of WebAssembly
- 1:32Compiler tiers and limitations
- 2:32The need for a new approach
- 4:48Side table architecture
- 7:10Implementation challenges
- 9:24Fine-tuning the interpreter
- 13:04Performance results
- 14:07Benchmarking and trade-offs
- 17:34Multi-dimensional analysis
- 20:11Instrumentation capabilities
- 22:40Key takeaways
- 24:02Future work and Q&A
related talks
35mInside the Wizard Research Engine
44mInside the Wizard Research Engine
37mDecoding the hype behind WebAssembly: Looking under the hood
01h 04mVirgil as a Systems Programming Language
01h 08mOn WebAssembly
32mWebAssembly: birth of a virtual ISA
44mInside the Wizard Research Engine
30mMechanising WebAssembly Well?
