JavaScript Compilation Techniques or "Wasn't JavaScript supposed to be slow?"
summary
Claims measurable speedups—roughly 100× faster since 2001 on SunSpider-like tests—and concrete techniques: compiling to machine code (V8 compiles eagerly, others tier and trace), bytecode+JIT, NaN tagging or 64-bit value layouts to avoid boxing, and polymorphic inline caches backed by hidden classes for property lookups. Generational GC and per-origin heaps reduce pause times. Benchmarks show lookup-miss and deep prototype changes slow things, caches break around ~10 object variants, and eval/with force conservative fallbacks.
AI-written summary · about
chapters (11)
- 0:00Intro
- 1:30Perspective
- 8:28Static scope
- 11:07Local eval == magic
- 13:25Basic unboxing
- 17:13The heap grows
- 18:09Mark, sweep
- 19:19Divide and conquer
- 20:18Generational GC
- 23:45Inline caching
- 24:43Hidden classes
related talks
29mExtreme JavaScript Performance
29mJavaScript Engines: How Do They Even?
33mJavaScript: The V8 Engine optimization tips (...)
52mJavaScript at the Speed of Light
26mJavaScript JITs
29mJavaScript in JavaScript: Inception
25mJavaScript engines how do they even?
39mHow much performance can you get out of Javascript?
