Compiler
From Coderwiki
More actions
A compiler is used in order to convert the source code of a compiled language into machine code or bytecode.
A compiler generally converts the source code into intermediate representation, and (possibly) finally into machine code.
Compiled languages
A compiled language is a type of programming language where, instead of stepping through each instruction of a program (like an interpreted language) the source code is converted into machine code by a compiler.
Advantages of compiled languages
- Generally much faster execution time
- Users do not need to install an interpreter to execute the program, as compilers usually produce an executable file
Disadvantages of compiled languages
- Compile times can be long, so rapid iteration becomes slower
Bytecode
For some programming languages, instead of directly compiling to machine code, the source code is instead converted to a format known as bytecode.
This bytecode can't be directly executed by the CPU, but can be interpreted using an interpreter, often known as a process virtual machine.