Namespace LogoNamespace0.3L
cs140pythoncs141csswebdevhtmlalgorithmsmathethics

  Guide

Week 1 | Lecture Notes

Mon Aug 22 2022

Introduction & Overview of a Compiler. Lexical Analysis.

Introduction and Overview of a Compiler

A compiler is a program that can read a program in one language and translate it into an equivalent program in another language.

An interpreter, on the other hand, directly executes the source program statement by statement.

A compiled program is typically much faster than executing through an interpreter. However, interpreters are often useful for debugging.


JIT compilation combines the process of compilation and interpretation. The source code is first compiled into an intermediate platform-independent bytecode, which is compiled at runtime into native machine code. This strikes a balance between speed and portability. Java and Scala both make use of JIT-compilation.

Bytecode is a type of IR (Intermediate Representation), a form into which source code is first converted before a final conversion to executable code.

An undescribed image