Performance profiling for V8
summary
V8 profiling shows exact failure modes: inline caches (ICs) go from monomorphic to polymorphic to megamorphic, causing extra map checks and deoptimizations; deopt loops can trigger “not optimized too many times” and disable optimization after repeated bailouts; runtime tools include Chrome DevTools CPU profiler plus flags like --trace-ic and --print-opt-code and the ICE/inline cache Explorer (iced tea) and d8; the talk demonstrates reading optimized machine code, tracing IC states, and fixing code patterns so the optimizer actually sticks.
AI-written summary · about
chapters (12)
- 0:00Start
- 4:59Dynamically Typed
- 6:25In-Time Compilation
- 7:29Function Load
- 9:25Simple Load Function
- 11:12Inline Caches
- 12:35Optimizing Compilers
- 13:56Machine Code
- 15:13Check Maps
- 16:14Deoptimization Bailout
- 18:33Line Cache Explorer
- 21:43Optimizations
related talks
28mPerformance Profiling for V8
32mV8 by example: A journey through the compilation pipeline
23mJoin the super secret V8 club & become a JavaScriptbender
33mJavaScript: The V8 Engine optimization tips (...)
26mPractical Optimization for V8
24mDemystifying V8 and JavaScript Performance
41mBenchmarking JavaScript
22mHigh Performance JS in V8
