Dynamic Analysis 17-654/17-754: Analysis of Software Artifacts - - PDF document

dynamic analysis
SMART_READER_LITE
LIVE PREVIEW

Dynamic Analysis 17-654/17-754: Analysis of Software Artifacts - - PDF document

Dynamic Analysis 17-654/17-754: Analysis of Software Artifacts Jonathan Aldrich Part 1: Performance Analysis Your boss tells you, make it run faster. What do you do?


slide-1
SLIDE 1

1

  • Dynamic Analysis

17-654/17-754: Analysis of Software Artifacts Jonathan Aldrich

  • Part 1: Performance Analysis
  • Your boss tells you, “make it run faster.”

What do you do?

slide-2
SLIDE 2

2

  • Speedup Analysis Scenario
  • Assumptions
  • Procedure x takes 75% of execution time
  • We can speed up x by a factor of 3
  • How much faster will the program run?
  • Amdahl’s Law
  • P = % of program you can speed up
  • S = speedup of that part of the program
  • Maximum overall speedup:

1 (1-P) + P/S

time to run sped-up program part time to run rest of program

slide-3
SLIDE 3

3

  • 80/20 rule (Pareto principle)
  • 20% of the program takes 80% of the

time

  • No point in optimizing anything until you

know what 20% is causing the problem!

  • Another way of stating Amdahl’s law
  • Getting Good Performance
  • What matters?
  • Algorithms
  • Parallelism
  • Cache

performance

  • Caching
  • trade space for time
  • Doing less work
  • trade precision for

time

  • What doesn’t?
  • Inlining vs. calls
  • field reads vs.

accessors

  • Recursion vs.

loops

  • Low-level

arithmetic

What’s the cost of optimization?