Virtual Machines 101
summary
Compares SpiderMonkey, V8, Chakra, JavaScriptCore and Nashorn and explains concrete internals: V8 skips bytecode to emit machine code; engines use hidden classes and inline caches plus SSA and loop‑hoisting to cut lookups and dead code; Chakra runs JIT and GC on separate cores; asm.js supplies type hints and claims 90% static code; avoid delete, sparse arrays, with and try/catch (deoptimizes); Avatar.js runs Express faster on Nashorn thanks to Java IO; one framework sees ~18% gain after removing deletes.
AI-written summary · about
chapters (18)
- 0:00Start
- 3:55Requirements for a Client-Side Virtual Machine
- 4:25Difference between a Client-Side Virtual Machine and Server-Side Virtual Machine
- 4:53Databases
- 5:19Javascript Virtual Machines
- 6:48The Properties of a Virtual Machine
- 9:33Single Static Assignment
- 9:44Java Virtual Machine
- 11:40Fee Instruction
- 12:31Code Hoisting
- 12:56The Interpreter
- 15:36Interpreted Vms
- 18:26Demonstrating Hidden Classes
- 22:08Inline Caching
- 26:56Code Type Specialization
- 28:36Pitfalls
- 36:41C Extensions
- 40:49Pointer Tagging
related talks
21mDemystifying Javascript Engines
23mJavaScript Engines: The Good Parts™
17mDemystifying (JavaScript) engines
18mDemystifying JS Engines
26mJavaScript VMs 101
30mHow a JavaScript engine works: learn to write optimizable JS
25mJavaScript engines how do they even?
22mVirtual Machines, JavaScript and Assembler
