Alternatives to compilation?
Interpreter is a program that reads source code and directly executes it
- does not generate the translation of the source program first
Advantages of compilers over interpreters:
- once compiled, execution can be much faster
- 'carefully prepare' program for fast execution
- better semantic checks: examine the entire program
and report errors before program is run
Just-in-time compiler (e.g. Java virtual machine)
- starts by interpreting the program
- later compiles the parts where speed is critical
At the end of course, we will say a few words about
- Java virtual machine, e.g. memory management