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 ?
-
@trincot this question is a very poor fit for Programmers - it would be quickly voted down and closed over there, see Why we're not customer support for [your favorite company]. Recommended reading: What goes on Programmers.SE? A guide for Stack Overflowgnat– gnat2016-04-28 20:28:20 +00:00Commented Apr 28, 2016 at 20:28
-
See programmers.stackexchange.com/questions/291230/…trincot– trincot2016-04-28 20:30:53 +00:00Commented Apr 28, 2016 at 20:30
-
1@gnat It doesn't sound like tech support question at all. It's asking for specifics on a generally available library's behavior which can be relevant for programming endeavors. It's not a great question, but it's not customer support by any stretch.xaxxon– xaxxon2016-05-01 08:30:54 +00:00Commented May 1, 2016 at 8:30
-
Think carefully about the meaning of "JIT" (just in time) compiler.user663031– user6630312016-05-01 12:27:17 +00:00Commented May 1, 2016 at 12:27
Add a comment
|
1 Answer
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.