Fast by default: algorithmic performance optimization in practice
summary
Practical specifics: Chrome DevTools profiling isolates a source-map hotspot in Rollup where magic-string generates then decodes a map — removing the double conversion speeds source-map generation ~40%. Rewriting a decoder to stream characters removes allocations and runs ~3× faster. Replacing naive scans with binary search yields ~40× speedups in a heavy case; a coverage tool gains ~15× by switching line keys to zero-based. Ports to Rust/C++ hardly beat carefully tuned JavaScript; spatial indexing like kdbush shows what actually gets built and that it works.
AI-written summary · about
chapters (6)
- 0:00How I got here
- 2:25The fastest libraries
- 6:32How to make fast code
- 17:05logarithmic complexity
- 18:51optimization
- 19:26data structure
related talks
36mPerformance for the long haul
36mAlgorithmic performance optimization in practice
31mJavaScript Compilation Techniques or "Wasn't JavaScript supposed to be slow?"
29mExtreme JavaScript Performance
59mProfiling JavaScript Like A Pro
34mUnderstanding JavaScript Performance
46m10 secrets to improve Javascript Performance
49mWhen Fast is Faster Than Fastest
