2022年4月23日 第一章

Using the above approach, an executable can only run on a particular processor type (like an x86 processor); to run a program on multiple processor types, the programmer must have the compiler generate multiple executables. Some newer high-level languages like Java use an approach that allows the same executable to run on different processor types. The approach involves having the compiler generate an executable using machine instructions of a “virtual” processor; such an executable is sometimes called bytecode. Then, the real processor runs a program, sometimes called a virtual machine, that executes the instructions in the bytecode. Such an approach may yield slower program execution, but has the advantage of portable executables.

cache在cpu上