[理工] [計組] 102中央資工 Performance
問題已解答,感謝各位
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 .
--
有一個香錦囊,是從一個神話般的守軍的血屍頂上剝下的。那一次我們部隊遭受從未
有過的頑強抵抗,我們犧牲了三個艦隊,一個裝甲師和無以數計小組推進的敢死排,才摧
毀了那處隘口的碉堡。但是竟然發現,使我們遭受如此慘烈傷亡的守軍,總數只有一人。
士兵們起鬨地在他胸前發現這枚香袋,大家都相信這是一枚具有神奇力量的護身符。
我們把他的頭顱砍斷,取下香袋,剝開,
裡面一張被血浸紅的宣紙竟用漢字娟娟秀秀四個整齊的楷書寫著-「盼君早歸。」
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.224.35.64
※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1479703247.A.B72.html
推
11/21 12:50, , 1F
11/21 12:50, 1F
→
11/21 12:50, , 2F
11/21 12:50, 2F
→
11/21 12:50, , 3F
11/21 12:50, 3F
這個選項大概是我最不確定的,但通常被Compiler過後應該稱為
「assmebly instruction」 吧@@? 是這個原因嗎?
→
11/21 12:52, , 4F
11/21 12:52, 4F
→
11/21 12:52, , 5F
11/21 12:52, 5F
→
11/21 12:53, , 6F
11/21 12:53, 6F
→
11/21 12:57, , 7F
11/21 12:57, 7F
因為還有其他 factor 可以影響吧? EX Clock Cycle time 等等之類的
推
11/21 13:11, , 8F
11/21 13:11, 8F
就某種程度而言 Execution Time 的公式IC * CPI * Clock cycle time
不也跟 Divide and conquer 很像嗎? 分開測量此三種 Factor 後結合
成一個解
Divid nad cnquer :將一個問題分成無數個小問題,解決各個小問題
大問題也跟著解決了
推
11/21 15:35, , 9F
11/21 15:35, 9F
→
11/21 15:35, , 10F
11/21 15:35, 10F
→
11/21 15:45, , 11F
11/21 15:45, 11F
大概能理解若 factor 互相影響則無法使用 Divide and conquer
可否舉例一些關於 CPI IC and CT 會互相影響的例子@@?
還是這裡是指因 Execution Time = 此三變數的乘積
因此不算此類呢?? 感謝
推
11/21 16:04, , 12F
11/21 16:04, 12F
→
11/21 16:04, , 13F
11/21 16:04, 13F
→
11/21 16:05, , 14F
11/21 16:05, 14F
感謝兩位大大解答,順便問A選項有甚麼看法
推
11/21 16:34, , 15F
11/21 16:34, 15F
推
11/21 17:09, , 16F
11/21 17:09, 16F
改完顏色也突然看到 XD 應該是total 沒錯 感謝
推
11/21 17:21, , 17F
11/21 17:21, 17F
通常不會談論 Average Execution time ,因為每個 Program 的 instruction
不太一樣,overhead、stall 等等都必須考量進去,「average」就有點不准了
剛剛看到某國外網址有人問同樣題目 https://goo.gl/XCZWYW 參考看看
※ 編輯: ken52011219 (36.224.35.64), 11/21/2016 17:37:21
推
11/21 17:54, , 18F
11/21 17:54, 18F
→
11/21 17:54, , 19F
11/21 17:54, 19F
感覺還是需要各種考量QQ
推
11/22 10:49, , 20F
11/22 10:49, 20F
→
11/22 10:49, , 21F
11/22 10:49, 21F
※ 編輯: ken52011219 (36.224.35.64), 11/22/2016 10:51:49