[理工] [計組] 102中央資工 Performance

作者: ken52011219 (呱)   2016-11-21 12:40:41
問題已解答,感謝各位
About the performance analysis ,which of the following statement(s) should
be true ?
A. Assume that a C program is compiled into 1000 machine instruction,
which are related to the size of the executable file.
Then, the average execution time is usually equal to multiplying
1000(instructions) by its average CPI and the clock cycle time.
B. In evaluating the performance by using the benchmark tests , we
usually use the geometric mean to calculate the average value
among various test result.
C. MIPS is not reliable metric since it provide the wrong result when
we compare the performance of a compiled program running on two
machine with the same instruction set architecture.
D. It's usually a preffered approach to consider only one of the three
factors: clock rate , CPI or the instruction count , and then try
to improve it to decrease the execution time.
That is called a divide-and-conquer methodology.
E. None of above it .
作者: ken52011219 (呱)   2016-11-22 10:49:00
答案為e 全錯 我補上好了
作者: Transfat (Transfat)   2016-11-22 10:49:00
所以答案應該是什麼呀霧颯颯
作者: aa06697 (todo se andarà)   2016-11-21 12:50:00
A我覺得是C語言基本上極少你的程式沒有call function, loop, branch...等等 應該是不太可能1000個指令順順地執行一次就結束C就是如你所說 已經是compiled過的program所以指令一樣又用一樣的ISA 那不就是比電腦效能了(不只是mips應給是所有ISA都是這樣吧)D 我也不確定 但是看都only就不會選XD
作者: k2shouai (coding....)   2016-11-21 13:11:00
B敘述的做法是AM,D的做法不是divide and conquer
作者: krusnoopy (push)   2016-11-21 15:35:00
D因為那三個因素會互相影響,要分治的前提是子問題不會互相影響
作者: k2shouai (coding....)   2016-11-21 15:45:00
推樓上, 洪逸上課有強調這點,用DP子問題才能互相影響.
作者: krusnoopy (push)   2016-11-21 16:04:00
舉個例子如果用更強指令可減少instruction count 但是可能會增加CPI或者選擇增加cycle time來完成一條指令
作者: k2shouai (coding....)   2016-11-21 16:05:00
作者: krusnoopy (push)   2016-11-21 16:34:00
我也不會QQ
作者: k2shouai (coding....)   2016-11-21 17:09:00
是total executed time才對~ 被騙了XD
作者: krusnoopy (push)   2016-11-21 17:21:00
這樣很模糊內,一個C program的平均執行時間有錯嗎他們大部分都是在說excution time錯,那改成CPU excution time不知道會不會對

Links booklink

Contact Us: admin [ a t ] ucptt.com