Skip to main content

Posts

Showing posts from July, 2022

Difference between Compiler and Interpreter

  Compilers and Interpreters are programs that translate a source code (a file that contains the program) to a machine code that can be understood by a processor. A compiler translates source code as a whole and performs various optimization techniques before mapping it to executable machine code. But, an interpreter translates source code as needed in runtime - it maps source code to machine code almost immediately. Role of Compiler • Compilers reads the source code, outputs executable code, • Translates software written in a higher-level language into instructions that computer can understand. • It converts the text that a programmer writes into a format the CPU can understand. The process of compilation is relatively complicated. • It spends a lot of time analyzing and processing the program. • The executable result is some form of machine-specific binary code, Role of Interpreter • The interpreter converts the source code line-by-line during RUN Time. • Interpret completely tran