A compiler designer is deciding between two code snips [ # 1 and #2] for a certain setup. The hardward designers have this data about the CPI for each class, and instruction counts for each
code sequence
CLASS CPI for this instruction class
A 2
B 3
code instruction counts for
snips instruction classes
1 A=2, B = 6
2 A=7, B =4
How many cycles are required for each code snips?
Which is faster and by how much?
What is the CPI for each code snip?