|
|||||
|
(on the same algorithm and data structure) on the complete same hardware resources, should the execution time be double? For a completely same execution(same workload on the same application with the same hardware resources), must the execution time of each run be the same? What might be the factors make execution time different? Many thanks. |
|
> If I have a double-workload execution running on the same application > (on the same algorithm and data structure) on the complete same > hardware resources, should the execution time be double? It depends on the time complexity of the algorithm. If you are simply processing each data item once, then yes, you'd normally expect the runtime to double. If, however, you are doing something more complicated (e.g. sorting), you can expect the workload to rise. Look up "time complexity" in Knuth. > For a > completely same execution(same workload on the same application with > the same hardware resources), must the execution time of each run be > the same? What might be the factors make execution time different? It could certainly vary, for all sorts of reasons. For example, it may depend on external resources (such as network connectivity), or there may be some random element within the algorithm (e.g. card-shuffling), or perhaps on one run the disk accesses just happen to correspond nicely with the way the disk is spinning, whereas on the next run they don't. Think, think, think. Measure, measure, measure. Graph, graph, graph. Think, think, think. In that order. -- Richard Heathfield "Usenet is a strange place" - dmr 29/7/1999 email: rjh at above domain (but drop the www, obviously) |
|
<> wrote: >If I have a double-workload execution running on the same application >(on the same algorithm and data structure) on the complete same >hardware resources, should the execution time be double? For a >completely same execution(same workload on the same application with >the same hardware resources), must the execution time of each run be >the same? What might be the factors make execution time different? > Not necessarily. Cache might make execution: a) faster, for double case, just because of sharing the same execution code may result in less paging operations. b) slower, because having double data size, might result in lots of paging opeartions, may the data not fit within this cache. So, nothing is really predictable about the execution time. It depends not only on the hradware and the program itself, but also on all the running environment. regards, Zara |