Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

93
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!