< previous page page_164 next page >

Page 164
Table 3.13 Mean interval* between condition code set and test (instructions) for a variety of programs. General data are for both compiler and object code for commercial and scientific environments. The second part of the table is for scientific environment only (object and compiler code).
General
Scientific Only
Program with max. interval
1.58
1.58
Program with min. interval
0.05
0.95
Arithmetic mean
0.68
1.27
Geometric mean
0.33
1.24
*An interval of 0 means that the conditional branch instruction is immediately preceded by an instruction capable of modifying the condition code.

Branches
Few areas of pipelined processor design have received as much attention as the effect of branches on program execution. Branches are frequent and can be disruptive. Avoiding branches by unraveling code may be counterproductive by increasing code size and hence decreasing cache performance.
A number of misleading claims are sometimes made describing particular actions that have been incorporated into high-speed processors to mitigate the effect of branches. A claim such as "zero branch penalty" generally means that the implementation uses a rather shallow pipelinethere is not much concurrency going on, and/or the cycle has been elongated to ensure that the outcome is known before the next instruction is executed. As processors go faster and pipelines deeper [199], branches become more of a problem. Additional hardware can only go partway in providing a solution. For example, hardware to correctly predict the outcome of a branch succeeds only in making a conditional branch appear as an unconditional branch, which itself may represent a significant "break" in the pipeline.

3.4.5 Move and Arithmetic Class Operations
Understanding the composition of the various instruction classes may be vital in accurately predicting performance. Certain instructions generally take considerably longer to execute than others. Instructions such as fixed point add/subtract, load or store register, shift, compare, and logical operation usually have a minimum execution time. On the other hand, floating and fixed point divide and certain character string move and decimal instructions have long execution times, well in excess of the minimal allocation. These instructions are called run-on instructions, meaning that they occupy the execution unit for significantly longer than the minimum period. Run-on instructions, while infrequent, can dominate program execution. For example, an instruction that occurs only 2% in dynamic frequency but requires an additional 33 cycles of execution increases overall instruction execution by .66 cycles per instruction. Since most machines do not allow

 
< previous page page_164 next page >