看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《mqazz1 (無法顯示)》之銘言: : assume that multiply instructions take 12 cycles and account for 15% of the : instructions in a typical program, and the other 85% of the instructions : require an average of 4 cycles for each instruction : (b) your hardware engineering team has indicated that it would be possible to : reduce the number of cycles required for multiplication to 8, but this will : require a 20% increase in the cycle time. Nothing else will be affected by the : change. Should they proceed with the modification? : 請問這題要怎麼解? : 張凡上冊243頁 謝謝 execution time = cycle time * cpi * # of instructions old machine: cycle time = 1 (normalized) cpi = 15% * 12 + 85% * 4 = 1.8 + 3.4 = 5.2 # of instructions = 1 (normalized) execution time = 1 * 5.2 * 1 = 5.2 new machine: cycle time = 1.2 (normalized) cpi = 15% * 8 + 85% * 4 = 1.2 + 3.4 = 4.6 # of instructions = 1(normalized) execution time = 1.2 * 4.6 * 1 = 5.52 因為新的機器 execution time 較長所以 performance 較差, 不應該為了效能的原因作這個修改。 -- 活著的目的是為主活 然後為主死 死亡的目的是為主死 然後為主活 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.24.61