Let us analyze the relative performance of using conditional data transfers versus conditional control transfers for the

Question:

Let us analyze the relative performance of using conditional data transfers versus conditional control transfers for the programs you wrote for Problems 4.5 and 4.6. Assume that we are using these programs to compute the sum of the absolute values of a very long array, and so the overall performance is determined largely by the number of cycles required by the inner loop. Assume that our jump instructions are predicted as being taken, and that around 50% of the array values are positive.

A. On average, how many instructions are executed in the inner loops of the two programs?

B. On average, how many bubbles would be injected into the inner loops of the two programs?

C. What is the average number of clock cycles required per array element for the two programs?

Problems 4.5

Modify the Y86-64 code for the sum function (Figure 4.6) to implement a function absSum that computes the sum of absolute values of an array. Use a conditional jump instruction within your inner loop.

Problems 4.6

Modify the Y86-64 code for the sum function (Figure 4.6) to implement a function  absSum that computes the sum of absolute values of an array. Use a conditional  move instruction within your inner loop.

Figure 4.6

x86-64 code 1 2 3 4 5 6 7 8 9 10 11 1 2 3 5 7 9 10 11 long sun(long start, long count) start in %rdi, count

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Computer Systems A Programmers Perspective

ISBN: 9781292101767

3rd Global Edition

Authors: Randal E. Bryant, David R. O'Hallaron

Question Posted: