Compiler

Interpreter

FeatureCompilerInterpreter
ProcessingConverts the entire source code into object code before executionTranslates and executes source code line by line
Execution SpeedCompiled code runs fasterInterpreted code runs slower
Error HandlingDisplays all errors after compilationDisplays errors of each line one by one
Memory RequirementRequires more memoryRequires less memory
PortabilityCannot be easily ported as it is bound to a specific target machineWorks well in web environments and can be easily ported
DebuggingDifficult to debug as the program cannot be changed without getting back to the source codeEasier to debug as programs written in an interpreted language are easier to debug