Compiler vs Interpreted Language
2 min readJan 1, 2023
A compiler is a type of computer program that translates source code written in a programming language into machine code that can be run on a computer. The machine code is a low-level code that is specific to the particular computer architecture and operating system.
An interpreted language is a type of programming language that is not compiled, but is instead executed by an interpreter. An interpreter is a type of computer program that reads and executes source code written in an interpreted language.
Some key differences between compiled and interpreted languages include:
- Execution: Compiled languages are translated into machine code before they are run, while interpreted languages are executed directly by the interpreter.
- Speed: Compiled languages generally run faster than interpreted languages because the machine code is optimized for the specific computer architecture and can be executed directly by the processor. Interpreted languages are generally slower because they must be parsed and executed by the interpreter at runtime.
- Portability: Compiled languages are generally more portable because they can be compiled for different platforms and architectures. Interpreted languages are generally less portable because they require an interpreter to be available on the target platform.