Reputation: 19641
Does the V8 engine that is used in Chrome and Node.js compile the entire code to machine language once or it compiles the next context to be executed every time for each context that is added to the call stack ?
Upvotes: 0
Views: 165
Reputation: 19751
V8 will likely compile some of your code to machine language and likely not compile all of it to machine language.
The exact representation for any piece of code depends on many factors, including the ever-changing optimization behaviors in the library. None of it is guaranteed and shouldn't be treated as such, even if it behaves a certain way right now.
Upvotes: 1