One technique is to corral frequently used instructions into tight groups that the CPU can break into instruction strings and process simultaneously. Optimizing compilers also maximize cycle times through branch prediction, where the compiler attempts to predict the results of GOTO instructions, thus saving the CPU from having to locate outcomes dispersed throughout a program. Speculation, a related technique, has the optimizing compiler load instructions early, in an attempt to improve the CPU's performance. Other Options Interpreters also translate high-level programming code into machine language, but they do it line by line as the application runs. The computer that's running the high-level code must also run the interpreter in order to understand the program.
Interpreters are valuable for testing newly written or modified code or teaching programming.
Basic started as an interpreted teaching language. Software that's compiled ahead of time runs faster than interpreted programs. Thus, compiled programs are preferred for large, enterprisewide applications, but they aren't as good for Internet Age applets destined to run on an unknown target machine. The Java platform uses a third alternative, bytecode. With bytecode, a high-level program is translated into an intermediate form that can run on various hardware platforms.