Attila's Blog

About writing your own programming language in C, Go and Swift

Virtual machine

Jul 12, 2018 Comments

Categories: aspl

In the previous article we chose to generate code for a virtual machine. But what is it exactly?

A virtual machine is an emulator of a computer system. There are two types of virtual machines:

  • system virtual machines, those that emulate a complete computer system, they can be used as a substitute of a real computer. They can execute an entire operating system, and thus they are also called full virtualization VMs.
  • process virtual machines, they are designed to execute computer programs in a platform-independent environment.

Optimization

Jul 6, 2018 Comments

Categories: aspl
Tags: optimization

Optimization is the process of transforming the code to make it more efficient (uses fewer resources) while preserving its semantics (has the same meaning).

In general, during optimization less efficient high-level structures are replaced with more efficient low-level structures. Optimization is usually implemented as a series of optimizing transformations (algorithms). The main goal is usually to make the program run faster, and - to a lesser degree - to use less memory.