Question: A program may be written in a language that is compiled to native binary (to the instruction opcodes the actual CPU knows how to do),
A program may be written in a language that is compiled to native binary (to the instruction opcodes the actual CPU knows how to do), or it may be interpreted (translated to native binary statement by statement as the program runs.) Suppose part of a program initializes a 500,000 element array to all 0 (i.e., each of 500,000 elements is set to 0). A compiled version performs this action in 0.001 seconds; an interpreted version takes 0.416 seconds. Why is the compiled version so much faster?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
