Question

Performance of Compilers [25 pts.] In this question, we are given two different compilers with name Batman and Robin that are

0 0
Add a comment Improve this question Transcribed image text
Answer #1

For Batman
Total clock = 10*1 + 3*2 + 2*3 = 22 millions
Total instruction = 15 millons
average clock per Instruction = (22*10^6)/(15*10^6) = 22/15
MIPS = 10^9/(22/15) = (15000/22)*10^6 = 681.81 MIPS
execution time = 22*10^6/(10^9) = 0.022 seconds

For Robin
Total clock = 20*1 + 1*2 + 2.5*3 = 29.5 millions
Total instruction = 23.5 millons
average clock per Instruction = (29.5*10^6)/(23.5*10^6) = 29.5/23.5
MIPS = 10^9/(29.5/23.5) = 796.61 MIPS
execution time = 29.5*10^6/(10^9) = 0.0295 seconds

According to MIPS , software Robin is faster (796.61 > 681.81)

Add a comment
Know the answer?
Add Answer to:
Performance of Compilers [25 pts.] In this question, we are given two different compilers with name...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 2 Performance of Compilers [25 pts.) In this question, we are given two different compilers...

    Question 2 Performance of Compilers [25 pts.) In this question, we are given two different compilers with name Batman and Robin that are tested for 1 GHz. machine with 3 classes of instructions: Class Bane, Class Dent and Class Penguin that requires 1, 2 or 3 cycles respectively. We have a huge line of code and we will compare the performance of these compilers. Batman Robin Bane Instructions 10 million 20 million Dent Instructions 3 million 1 million Penguin Instructions...

  • I need help with the following Computer Architecture question: Consider two different implementations, M1 and M2,...

    I need help with the following Computer Architecture question: Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 90 MHz and M2 has a clock rate of 80 MHz. The average number of cycles for each instruction class and their frequencies (for a typical program) are as follows: Instruction Class Machine M1 – Cycles/Instruction Class Machine M2...

  • We are comparing the performance of two different microprocessors, M1 and M2. Assume a program P...

    We are comparing the performance of two different microprocessors, M1 and M2. Assume a program P will be compiled into M2 instructions counting 20% more than M1 instructions. M1 has a 2 GHz clock rate while M2 has a 3 GHz clock rate. Instructions on these two machines can be classified into 3 classes as shown in the following table. Which machine has better MIPS? Which machine has better performance? By how much? Justify your answers. Instruction Class Cycles needed...

  • (e) Suppose we measure the code for the same program from two different compilers and obtain the following data. Assume clock rate is 3GHz, which code sequence will execute faster according to ex...

    (e) Suppose we measure the code for the same program from two different compilers and obtain the following data. Assume clock rate is 3GHz, which code sequence will execute faster according to execution time? or According to MIPS? By how much? (25 pts CPI for Instructions Code from Instruction Count (billions) CPI Compiler 1 Compiler 2 9 1 3 (e) Suppose we measure the code for the same program from two different compilers and obtain the following data. Assume clock...

  • Design and implement a C Language program that measures the performance of given processors. There are...

    Design and implement a C Language program that measures the performance of given processors. There are several metrics that measure the performance of a processor. We will be using the following 3 measures: 1.CPI (clock cycles per instruction) = #clock cycles /#instructions 2.CPU execution time = #instructions x CPI x clock cycle time . cylce time = 1/CPU clock rate in hertz units 3.MIPS (mega instructions per second)= #instrucrions/ CPU X 1000000 Typically, processors’ performance is measured using a wide...

  • Problem 3. (25 pts.) Compilers can have a profound impact on the performance of an application....

    Problem 3. (25 pts.) Compilers can have a profound impact on the performance of an application. Assume that for a program, compiler A results in a dynamic instruction count of 1 billion instructions and has an execution time of 1.1 seconds, while compiler B results in a dynamic instruction count of 1.2 billion instructions and an execution time of 1.5 seconds. A) Find the average CPI for each program given that the processor has a clock cycle time of 1...

  • Topics 1. MIPS instruction set architecture (ISA). 2. Performance. 3. MIPS datapath and control. Exercise 1...

    Topics 1. MIPS instruction set architecture (ISA). 2. Performance. 3. MIPS datapath and control. Exercise 1 Consider the memory and register contents shown below. Registers Ox0100 FFF8 13 ($t 5) 14 ($t6) 0x0100 FFFC 0x0101 0000 Memory 0x0000 0000 0x0001 1100 0x0A00 со00 0x1234 4321 OxBAOO OOBB 15 OXAAAA 0000 0x1111 1010 0x7FFF FFFD 0x0100 FFFO 0x0101 0008 (St7) Ox0101 0004 16 ($80) 0x0101 0008 17 ($sl) Show what changes and give the new values in hexadecimal after the following...

  • Question 1: Consider two different implementations, M1 and M2, of the same instruction set. There are...

    Question 1: Consider two different implementations, M1 and M2, of the same instruction set. There are four classes of instructions (A, B, C, and D) in the instruction set. M1 has a clock rate of 500 MHz while M2’s clock rate is 750 MHz. The average number of cycles for each instruction class of M1 and M2 are shown in the following table: Class CPI for this class on M1 CPI for this class on M2 A 1 2 B...

  • In the class, we have shown how to maximize performance on our pipelined datapath with forwarding...

    In the class, we have shown how to maximize performance on our pipelined datapath with forwarding and stalls on a use following a load. Rewrite the following code to minimize performance on this datapath – that is, reorder the instructions so that this sequence takes the most clock cycles to execute while still obtaining the same result: lw $3, 0($5)
 lw $4, 4($5)
 add $7, $7, $3 add $8, $8, $4 add $10, $7, $8 sw $6, 0($5)
 beq $10,...

  • How can we assess whether a project is a success or a failure? This case presents...

    How can we assess whether a project is a success or a failure? This case presents two phases of a large business transformation project involving the implementation of an ERP system with the aim of creating an integrated company. The case illustrates some of the challenges associated with integration. It also presents the obstacles facing companies that undertake projects involving large information technology projects. Bombardier and Its Environment Joseph-Armand Bombardier was 15 years old when he built his first snowmobile...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT