performance - Calculate execution time of a program based on CPI, instructions, etc -


i'm trying calculate execution time of application. assuming stall penalty occurs on memory access instructions (100 cycles being penalty). how supposed find out execution time in seconds info?

cpi (cpucycles?) = 1.0 clockrate = 1ghz totalinstructions = 59880 memoryaccessinstructions = 8467 cachemissrate = 62% (0.62) (5290/8467) cachehits = 3117 cachemisses = 5290 cachemisspenalty = 100 (cycles) 

assuming no other penalties.

totalcycles = totalinstructions + cachemisses * cachemisspenalty ?

i assume cache hits cost same other opcodes, included in totalinstructions.

that's 588880 cycles, 1ghz 1000000000 cycles per second. code take 0.58888ms execute (5.8888e-7 second).

this value of course purely theoretical estimate, modern cpu doesn't work (1 instruction = 1 cycle). if interested in real world values, profile it.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -