Lecture 10
Learning objectives
After this class, you should be able to:
- Time code and micro-kernels, accounting for cache effects, etc, using GNU
timeand therdtsccounter (on Intel x86).- Use performance tools, such as
gprofto identify performance bottlenecks in code.- Compute bounds on performance of algorithms based on the memory bandwidth and flop rate of processors.
Reading assignment
- Refer to
gprofand GNUtimemanuals.Exercises and review questions
- Exercises and review questions on current lecture's material
- Use
gprofto identify performance bottlenecks in some large piece of code that you have written earlier (most probably in some other course or for your research).- Write code to measure the time for computing
y = cos(x)onlinprogwhenxandyare in each of the following locations: (i) main memory, (ii) L2 cache, and (iii) L3 cache. Summarize your results on the discussion board. Please also describe how you ensured that your timings accurately measure the quantity of interest.- Preparation for the next lecture
- None.
Last modified: 10 Feb 2010