grid - How to estimate the computational time of a program -


i doing project need estimate computational time of running program given input specific configuration of mobile device.

more precisely, suppose have program out of m instructions n instructions can executed in parallel. suppose computer has following configurations:

processor: 2.5ghz core 5 ram: 4gb 1600 mhz ddr3 cache: 2mb

based on above configuration or additional information (if required) there equation whereby can tell how time might require run program?

second question: suppose know executing program in above mentioned configuration need t seconds. based on can estimate how time might take device has different configuration 2 ghz core i5 3gb ddr3 ram , 1 mb cache?

thanks

such question pretty impossible answer. there far more variables number of instructions (running serially or in parallel). instance, virtual memory in play? if so, never know when program going have 1 of pages ejected. , when program need page again. worst case scenario pages start thrashing , execution time goes hell.

after virtual memory need consider how many of variables have been cached , in level of cache may exist. if have multiple cores , multi-threaded application have deal overhead of cache coherency protocols.

both virtual memory operations , data retrieval far, far slower instruction execution. many orders of magnitude slower.

even if take of out of picture (leaving worthless execution time value) , calculate amount of time takes execute instructions open whole new can of worms. first you'd need know cpi (cycles per instruction) of processor.

the take-away here trying predict execution time on number of instructions impossible. same true second question.

edited add

i forgot ahmdal's law. if want purely theoretical approach this. might want little bit. there's pretty simple equation how speed can adding more parallel resources. ahmdal's law


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -