Lecture 10
Learning objectives
After this class, you should be able to:
- Time code and micro-kernels, accounting for cache effects, etc, using GNU
time
and therdtsc
counter (on Intel x86).- Use performance tools, such as
gprof
to 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
gprof
and GNUtime
manuals.Exercises and review questions
- Exercises and review questions on current lecture's material
- Use
gprof
to 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)
onlinprog
whenx
andy
are 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