Join the super secret V8 club & become a JavaScriptbender
summary
Explanation of V8 internals and practical hacks: Ignition, Sparkplug and TurboFan compile tiers are named and compared; changing argument types forces deoptimization via hidden maps (hidden classes) and SMI/type transitions; using --trace-opt / --trace-deopt and native syntax shows when functions move between interpreted, baseline and optimized code; an optimized loop benchmark goes from about 70M → 161M ops/s; the inspector protocol yields CPU profiles and heap dump via inspector for remote debugging; snapshots are arriving for faster Node startup.
AI-written summary · about
chapters (8)
- 0:00Intro
- 1:12JavaScript engines
- 1:40V8 engine V8 is the JavaScript engine created by Google and used for Chrome, Chromium, Node.js, Deno, MS Edge, mini_racer and many more. V8 is an open source project, written mostly in C++.
- 7:18V8 code de-optimization
- 12:48are optimized functions really faster?
- 14:07Question 2: can I check the optimization status of a function from within the code?
- 16:04can I manipulate memory-related stuff?
- 17:00Chrome Debug Protocol
related talks
32mV8 by example: A journey through the compilation pipeline
33mJavaScript: The V8 Engine optimization tips (...)
17mV8 engine, JS Code Interpretation, and Execution
01h 00mV8 Under the Hood
22mHigh Performance JS in V8
25mJavaScript engines how do they even?
28mPerformance Profiling for V8
26mArchitectural Changes In New V8 versions
