Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
Do V8 execute Byte code produced by the interpreter or binary code produced by the turbofan compiler?

I am confused about how v8 works and how it execute js code.

I understand that v8 first parse the code and create AST then take this AST introducing it to the interpreter as input and produce byte code then this byte code introduced to turbofan compiler that converts this intermediate code to machine code that computer understands.

I am reading an article about this topic which is good but it turned out that something is confusing to me

  1. Execution Phase: The byte code is executed by using the Memory heap and the Call Stack of the V8 engine’s runtime environment

I thought that machine code is the one that get executed otherwise why we need to create that code if the byte code is the one that is executed??

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

(V8 developer here.)

To confirm what @Bergi said in his comments: bytecode primarily serves the purpose of being executed by the interpreter, and that is in fact all that's needed to execute JavaScript. V8 (nowadays) doesn't compile all functions to machine code, only those that run hot enough for optimized compilation to (likely) be worth the time investment. As a particular detail of the implementation, the optimizing compiler uses the bytecode as input, which gives bytecode a secondary purpose; but that's really just a detail that could have been solved differently, such as by parsing the original source to an AST again when the optimizing compiler kicks in, which is how V8 used to do it until a couple of years ago.

(The article you linked to does mention most of these concepts, but I agree that it's written somewhat confusingly, and I'd disagree with some of its characterizations. See v8.dev/blog for official descriptions of how things work.)

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda