Re: [理工] [計組] performance相關計算
※ 引述《privatewind (傷神客)》之銘言:
: ※ 引述《christianSK (AG)》之銘言:
: : 給定三個指令 A B C
: : 他們的CPI分別是 a b c
: : 如果今天clock rate 增加到150%
: : A 的CPI變成1.5倍的a 而 B C 的CPI不變
: : 如果說A指令佔 40 %
: : 問 ( performance_new / performance_original ) - 1 = ?
: : solution:
: : ans = 1 / [ (0.4*1.5+0.6)* 1 / 1.5 ] = 1.25 - 1 = 0.25
: : 不太能理解解答的做法 為什麼可以直接說 B C 新的CPI = 0.6呢??
: : 先謝謝大家了~
: By Amadal law,
: 1/ ((0.4*1.5)/1.5+0.6/1.5) -1 =1/0.8 -1 =1.25 = 0.25.
: When clock rate of CPU increases to 1.5 times than the origin,
: the instructions of B and C types can also benefit from the improving.
: For B and C:
: CPU time = Cycle per instuction * Instuction count / Cycle rate.
: ^^^^^^^^^^
: much higher
: The reason is cycle rate, not the CPI, and the "0.6" is the percent of B and C
: instructions.
關於CPI的部分我想再問一下 P大前面那條Amadal的式子中
還沒簡化前應該是
IC * avg_CPI / clock rate
-------------------------
IC * avg_CPI' / clock rate' -----(*) 吧!?
而 avg_CPI' 應該是 ( 0.4 * 1.5 * CPI_A ) + (0.6 * avg_CPI) 吧??
這樣一來帶回原先的式子(*) 並沒有辦法把 CPI_A 跟 avg_CPI 消去
要滿足的話應該會是 avg_CPI' = ( 0.4 * 1.5 * avg_CPI ) + (0.6 * avg_CPI) 才對
(可是為什麼會等於呢?)
請問我這樣的說法是對的嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.114.32.193
※ 編輯: christianSK 來自: 140.114.32.193 (09/24 10:46)
推
09/24 17:08, , 1F
09/24 17:08, 1F
→
09/24 17:09, , 2F
09/24 17:09, 2F
→
09/24 17:10, , 3F
09/24 17:10, 3F
→
09/24 17:12, , 4F
09/24 17:12, 4F
→
09/24 17:12, , 5F
09/24 17:12, 5F
→
09/24 21:36, , 6F
09/24 21:36, 6F
→
09/24 21:36, , 7F
09/24 21:36, 7F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 3 之 4 篇):