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

98
Vistas
On-Stack-Replacement in V8

OSR optimization will be triggered when a loop is executed enough times. Marking and triggering an optimization task will occur in JumpLoop handler. Two questions about OSR in V8:

  1. Unlike ordinary function optimization, triggering an OSR optimization job will not in the next turn after marking. It may take a long period of time between marking and triggering a opt-job, why? What's the condition?

  2. How to continue to execute the interrupted function in optimized code?

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

0

Re 1. For several reasons, non-OSR optimization is generally preferable (in short, the generated code will be better). Doing OSR is only worth it when the function in question spends a really long time in a loop. So the purpose of waiting a bit is to see if the loop will finish soon enough.

Re 2. That's the "magic" of on-stack replacement: the contents of the stack frame are converted to the format that the optimized code for that function needs, and then a special entry point in the optimized code is taken that's able to resume execution from exactly the point where it was interrupted. (That's one of the reasons why non-OSR code is preferable: it doesn't need this special entry point.)

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