Engrain by ByteRush

JS.12.01 Senior

How V8 runs JavaScript

Comes up in: JavaScript, Web fundamentals

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • parse → AST → bytecode (Ignition) → baseline (Sparkplug) → mid-tier (Maglev) → optimising (TurboFan)
  • lazy parsing
  • profiling feedback
  • deoptimisation (all labelled as V8-specific, with v8.dev sources)

Words you will know

interpreterJIT compilerbytecodedeoptimisation

What you will practise

  • read --trace-opt/--trace-deopt output (worked, Node)

Interview questions this answers

  • How does the V8 engine execute JavaScript?
  • Is JavaScript compiled or interpreted?