Instruction prefetch
|
In computing, instruction prefetch is a common technique used in modern microprocessors to speed up the execution of a program by reducing wait states.
Modern microprocessors are much faster than the memory where the program is kept. This means that, literally, the program's instructions cannot be read fast enough to keep the microprocessor busy (see CPU cache for a common workaround).
Prefetch is the processor action of getting an instruction from the memory well before it will need it. In this way, the processor will not need to wait for the memory to answer its request.
The prefetched instruction may simply be the next instruction in the program, fetched while the current instruction is being executed. Or, the prefetch may be part of a complex branch prediction algorithm, where the processor tries to anticipate the result of some calculation and fetch the right instructions in advance. In the case of dedicated hardware (like a Graphics Processing Unit, or GPU, for example) the prefetch can take advantage of the spatial coherence usually found in the texture mapping process. In this case, the prefetched data are not instructions, but texture elements (texels) that are candidates to be mapped on a polygon.
The first mainstream microprocessor to use some forms of instruction prefetch were the Intel 80286 and the Motorola 68020.