What is Sparkplug in V8?
A baseline compiler between Ignition and TurboFan. It compiles bytecode to machine code without optimizations (just fast execution). It fills the gap between Ignition (slow) and TurboFan (slow to compile but fast to run) for moderate-hot code.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in V8's Ignition and TurboFan Explained
V8's interpreter. It compiles the AST into bytecode and executes it directly. Fast to generate (quick startup) but slower to execute than machine code. It collects type feedback for TurboFan.
V8's optimizing compiler. It takes hot (frequently executed) bytecode and compiles it to optimized machine code using type feedback from Ignition. Much faster execution. Deoptimizes if assumptions break.
When TurboFan's optimized assumptions break (e.g., a function receives a different type than expected), V8 discards the optimized machine code and falls back to Ignition bytecode. Performance drops until the function is re-optimized.
Still have questions?
Browse all our FAQs or reach out to our support team
