An interpreter translates high-level instructions into an intermediate form, which it then executes. In contrast, a
compiler translates high-level instructions directly into
machine language. Compiled programs generally run faster than interpreted programs. The advantage of an interpreter, however, is that it does not need to go through the compilation stage during which machine instructions are generated. This process can be time-consuming if the program is long. The interpreter, on the other hand, can immediately execute high-level programs.