Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

97
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda