Presentation is loading. Please wait.

Presentation is loading. Please wait.

Performance Analysis and Optimization. Performance: Time Space Power (cost) (weight) {development time, ease of maintenance, extensibility} Note: 1. “big-O”

Similar presentations


Presentation on theme: "Performance Analysis and Optimization. Performance: Time Space Power (cost) (weight) {development time, ease of maintenance, extensibility} Note: 1. “big-O”"— Presentation transcript:

1 Performance Analysis and Optimization

2 Performance: Time Space Power (cost) (weight) {development time, ease of maintenance, extensibility} Note: 1. “big-O” analysis not sufficient here, we are dealing with specific physical sizes 2. notation “big-O” often really means Θ

3 Arithmetic—basic algorithms Hierarchy of time complexity: increment / decrement addition / subtraction multiplication division / square root other operations can usually trade off time for space Example: addition of 2 16-bit numbers carry-ripple adder: time - 31 gate delays space - 16 full adders carry lookahead adder (4-bit units): time – 8 gate delays space – 4 4-bit CLA units—more gates, routing

4 fig_14_00 Example: summing array elements— linear in size of array

5 table_14_00 How to analyze performance and Do optimizations

6 fig_14_01 Rates of growth for commonly encountered complexity: Asymptotic complexity

7 fig_14_02 Time complexity: loop

8 fig_14_03 How does this differ from previous example?

9 fig_14_04 While loop

10 fig_14_05 Nested loops—example:

11 fig_14_06 Time complexity of conditional statements:

12 fig_14_07 Linear search:

13 fig_14_08 Selection sort:

14 Common data structures (not dynamic): Array: O(n) [move]: Insert / delete at beginning Insert / delete at end Insert / delete in middle O(1): Access at beginning Access at middle Access at end

15 Common data structures (not dynamic): Linked list: O(1): Insert / delete at beginning access at beginning O(n): insert / delete at end (or O(1) if extra pointer) insert / delete in middle Access at middle Access at end (or O(1) if extra pointer)

16 fig_14_09 Flow of control: sequential

17 fig_14_10 Loops/conditionals

18 fig_14_11 Example: loop

19 fig_14_12 Example: function call

20 fig_14_13 Code: C level

21 fig_14_14 Code: machine instruction set level

22 fig_14_16 If—2 levels

23 fig_14_18 While-2 levels

24 fig_14_19 Function call—machine level

25 fig_14_20 Function—C level

26 fig_14_21 What happens at machine level

27 fig_14_22 Function body– c level

28 fig_14_23 Function body—machine level

29 fig_14_24 Co-routines

30 fig_14_25 interrupts

31 fig_14_26 Response time—2 systems

32 fig_14_27 Best and worst case times

33 fig_14_28 Asynchronous events

34 fig_14_29 Memory: hierarchy / response times

35 table_14_03 Power usage for some common operations

36 fig_14_30 Power—sophisticated management possible

37 fig_14_31 Using a power manager

38 fig_14_32 Power management schemes

39 fig_14_33 Standard power modes

40 table_14_02 Ways to analyze performance during development


Download ppt "Performance Analysis and Optimization. Performance: Time Space Power (cost) (weight) {development time, ease of maintenance, extensibility} Note: 1. “big-O”"

Similar presentations


Ads by Google