[理工] [计组] 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