Download presentation
Presentation is loading. Please wait.
Published byMadlyn York Modified over 9 years ago
1
Lecture 9: 9/24/2002CS170 Fall 20021 CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture 9: 9/24/2002
2
CS170 Fall 20022 Outline Problem 2.44 (Another example of Amdahl’s law) Harmonic Mean Fallacies and Pitfalls Using arithmetic mean with normalized execution times Geometric Mean of execution time ratios is proportional to total execution time Other pitfalls Should cover section 2.7
3
Lecture 9: 9/24/2002CS170 Fall 20023 Another example For Amdahl’s Law Problem 2.44 on page 102
4
Lecture 9: 9/24/2002CS170 Fall 20024 Arithmetic Mean with Normalized Execution Times 1/2 M/C AM/C B P1110 P21000100 Normalize to A M/C AM/C B P1110 P210.1 AM15.05 Normalize to B M/C AM/C B P10.11 P2101 AM5.051 Machine A is 5.05 times faster than B Machine B is 5.05 times faster than A Problem ? (result depends on which machine is used as reference) AM: Arithmetic Mean ET(B)/ET(A) 10/1
5
Lecture 9: 9/24/2002CS170 Fall 20025 Arithmetic Mean with Normalized Execution Times 2/2 Normalize to A M/C AM/C B P1110 P210.1 GM11 Normalize to B M/C AM/C B P10.11 P2101 GM11 According to GM, machine A and B have the same speed Normalized results should be combined with the geometric mean and not arithmetic mean Geometric mean independent of which machine is used a reference because of the property GM Geometric Mean Take ratio of means or means of ratios produces the same results
6
Lecture 9: 9/24/2002CS170 Fall 20026 Geometric Mean does not track total ET M/C AM/C B P1110 P21000100 AM500.555 GM suggested that A and B have same performance Advantages independent of running times of individual programs Does not matter which machine used for normalization Disadvantage Does not predict execution time AM of execution times (proportional to total ET) suggests that B is 9.1 times faster than A
7
Lecture 9: 9/24/2002CS170 Fall 20027 Harmonic Mean When performance is expressed as a rate, such as MIPS, or MFLOPS (million floating point operations per second) see page 99 for a discussion of MFLOPS Harmonic mean tracks total execution (HM) Exercise 2.39 page 100
8
Lecture 9: 9/24/2002CS170 Fall 20028 Other pitfalls 1/2 Using hardware-independent metrics predict performance Use code size as measure of speed COPYRIGHT 1998 MORGAN KAUFMANN PUBLISHERS, INC. ALL RIGHTS RESERVED CDC 6600 runs Algol programs almost 6 times faster than B5500 CDC6600 programs are over three times as big as B5500 programs
9
Lecture 9: 9/24/2002CS170 Fall 20029 Other pitfalls 2/2 Synthetic benchmarks predict performance Artificial programs that are constructed to try to match characteristics of a large set of problems Examples Whetstone: measurements of Algol problems in a scientific and engineering environment, later converted to Fortran Dhrystone: benchmark for systems programming environment (originally written in Ada, then converted to C) Not interesting as real applications, and do not reflect program behavior Compiler and hardware optimizations can inflate performance
10
Lecture 9: 9/24/2002CS170 Fall 200210 Big Picture Execution time is the only valid measure of performance Remember the problems with MIPS as a measure of performance Any measure that summarizes performance should reflect execution time Weighted arithmetic mean summarizes performance while tracking execution time
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.