Need help from an expert?
The world’s top online tutoring provider trusted by students, parents, and schools globally.
Native code compilation translates source code directly into machine code, while intermediate code compilation translates it into an intermediate language first.
Native code compilation is a process where the source code written by programmers is directly translated into machine code that can be executed by a specific type of processor. This means that the compiled code is highly optimised for the target machine, resulting in high performance. However, this also means that the compiled code is not portable, i.e., it cannot be run on a different type of machine without recompilation. This is because different types of processors have different instruction sets, and the machine code for one type of processor will not work on another.
On the other hand, intermediate code compilation involves translating the source code into an intermediate language before it is finally translated into machine code. This intermediate language, often called bytecode, is a kind of abstract machine code that can be executed by a virtual machine. The advantage of this approach is that the bytecode is portable, i.e., it can be run on any machine that has a suitable virtual machine installed, without the need for recompilation. This makes it ideal for distributed systems where the code needs to be run on different types of machines. However, because the bytecode is not optimised for any specific type of machine, it may not perform as well as native code.
In summary, the choice between native code compilation and intermediate code compilation depends on the specific requirements of the software being developed. If high performance is a priority and the software will only be run on a specific type of machine, then native code compilation may be the best choice. However, if portability is more important, then intermediate code compilation may be more suitable.
Study and Practice for Free
Trusted by 100,000+ Students Worldwide
Achieve Top Grades in your Exams with our Free Resources.
Practice Questions, Study Notes, and Past Exam Papers for all Subjects!
The world’s top online tutoring provider trusted by students, parents, and schools globally.