DEV Community

Discussion on: Which JS loop is fast?

Collapse
 
rouilj profile image
John P. Rouillard

Ok, so V8. So suspect the answer to your question:

While running the loop first time in every case the time
taken is higher compared to other 9 test case, please
mention the reason in the comment section if you know that.

is probably the JIT compiler/optimizer:

blog.logrocket.com/how-javascript-...

Thread Thread
 
shubhamtiwari909 profile image
Shubham Tiwari

Thank i will read this