V8 Engine: Is there a way to reduce the code execution delay?

Started by: Patrick C1 voices1 posts

Yutaka outlined that the V8 engine can be slower than JScript. EmEditor Blog January 25, 2023 EmEditor Blog December 6, 2022 My testing showed that this is due to a delay until the V8 engine starts executing code. The V8 engine is fast once it runs, in some cases extremely fast when compared to JScript. Delay between call (execute macro) and the actual execution: JScript ≈ 2ms V8 ≈ 680ms Execution time (calculated pi over 2'000'000 iterations): JScript ≈ 1460ms V8 ≈ 35ms Curiosity Question: What causes this delay? V8 “JIT compiling” the code? → As outlined in https://cabulous.medium.com/how-v8-javascript-engine-works-5393832d80a7 The reason for asking, is that the delay makes the V8 engine unsuited when a fast reaction is required. PS If someone really wants to see the code … 😳

1 posts in this topic