Lessons learnt pushing browsers to the limit
summary
A Java NES emulator gets translated to JavaScript, writes a pixel buffer to canvas and after a patch that diffs frames it achieves 10× speedup and sustains 60 FPS while emulating about 10,000 CPU instructions per frame (~3–4 million/sec). Chrome V8 benefits from object layout and hidden classes, prototypes improve tight-loop allocation, timing uses setTimeout plus a busy loop for accuracy, and sound falls back from Firefox’s Audio Data API to a tiny Flash writer.
AI-written summary · about
chapters (14)
- 0:00Intro
- 1:29JavaScript
- 3:07Pixel
- 3:35Emulator
- 7:19Micro optimizations
- 7:56Safari
- 8:36Firefox
- 9:42Explorer
- 10:07Prototypes
- 13:06Benchmark
- 13:52Yaga
- 14:12Accurate timing
- 15:20Dynamic sound
- 15:40Audio data API
related talks
46mEmulating the NES/Famicom/Dendy with Web Technologies
41mBrowser Internals for JS Devs
40mHow to Improve JavaScript Performance
59mProfiling JavaScript Like A Pro
55mJavaScript Blazingly FAST! Lessons from a Game Engine
46mHow much performance can you get out of JavaScript?
29mJavaScript Engines: How Do They Even?
34mUnderstanding JavaScript Performance
