1 / 13

Why Does Performance Analysis Matter?

Why Does Performance Analysis Matter?. Check out the table of time complexity functions!. Comparison of Time Complexity Functions. Timings of Insert. Timings of Change Phase. Timings of Extract. Total Timings. Example: A Messy Timing Function.

urban
Télécharger la présentation

Why Does Performance Analysis Matter?

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. Why Does Performance Analysis Matter? Check out the table of time complexity functions!

  2. Comparison of Time Complexity Functions

  3. Timings of Insert

  4. Timings of Change Phase

  5. Timings of Extract

  6. Total Timings

  7. Example: A Messy Timing Function • Based on • using the Sorting_Machine to sort n items • selection sort used to implement the Sorting_Machine • tsel-sort(n) = c1* n + c2 + c3* n * (n+1)/2

  8. Simplify with Big-Oh Notation • Used to simplify the description of timing functions • Definition:Let f: integer0 integer0. Then,O(f) = {t: integer0 integer0 where there are constants c > 0 and m  0 such that t(n)  c * f(n) for all n  m} • When t is in O(f), we say t is O(f)

  9. What Does t is O(f) Mean? y y = 2*f(n) y=t(n) y=f(n) n m

  10. Big-Oh Continued… • Is tsel-sort in O(n2)? • Is tsel-sort in O(n3)? • Is tsel-sort in O(n)? • Is tsel-sort in O(n* log2(n))?

  11. Some Important Timing Functions • constant time: c • log time: c * log n • linear time: c * n • n-log-n time: c * n * log n • quadratic time: c * n2

  12. Growth of Common Functions n3 2n n2 n logn n logn c

  13. Big-Oh Example Comparisons of Running Times

More Related