1 / 9

Execution Performance

Execution Performance. Space complexity Time complexity. Space Complexity. The amount of memory that a program needs to run to completion Instruction space Data space Environment space. Time Complexity. The amount of computer time a program needs to run to completion

zoe-diaz
Download Presentation

Execution Performance

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Execution Performance • Space complexity • Time complexity

  2. Space Complexity • The amount of memory that a program needs to run to completion • Instruction space • Data space • Environment space

  3. Time Complexity • The amount of computer time a program needs to run to completion • Only attempts to estimate run time • Approaches: • Identify one or more key operations and determine the number of times that they are performed • Determine the total number of steps executed by the program

  4. Operation Counts • To estimate the time complexity of a program • Identify one or more operations, such as add, multiply, and compare, and determine how many times each is performed • Select the operations that contribute most to the time complexity

  5. Asymptotic Behavior • To predict the growth in run time as the problem size increases • Compare the time complexities of two or more programs

  6. Large Problem Size • Asymptotic notation describes the behavior of the time or space complexity for large instance characteristics • The notation f(n) = O(g(n)) means that f(n) is asymptotically smaller than or equal to g(n) • In an asymptotic sense, g(n) is an upper bound for f(n).

  7. Common running time (common order of magnitude) The order (in the descending order of efficiency: O(1) < O(logn) < O(n) < O(nlogn) < O(N2) < O(n3) <O(rn)

  8. Running Time: T = function(n)

  9. Running time in Big O notation Drop constants, coefficients Only care how T changes with input size, N Several categories of running time O(1), O(n), O(N2), O (logn) … etc. Figure 2.9 Table 2.5

More Related