Subject : Measuring Performance
Text : RS 1.0—1.1, 2.0—2.4, 2.7 Students with technical background should also read 2.5 [approx. 30 pages, expected reading time 3 hrs].
Download: Introduction slides for the first lecture. Lecture notes.
Prerequisites: Students with little programming experience should also read RS 3.0—3.2. If you are fluent in Java, feel free to skip. This is not a part of our course, but a refresher from a basic programming course.
Comments: This lecture introduces fundamental notions of modeling and analysing performance. The most important sections are 2.3—2.4. It is particularly important to fully understand the example on p.46. It is slightly more subtle than you may expect at first sight.
Some of the following exercises will be discussed at the exercise session:
Prove that lg(n+c) is O(lgn)
Prove that lg(n+c) is about lgn
Prove that lg(n+c) is proportional to lgn [trivial!]
Assume we run the improved version of sequential search algorithm from lecture 2.1 on an array consisting of all current inhabitants of Denmark (let us say n=5*106) sorted by their CPR numbers. We are searching for a particular person (a CPR number). The running time of a single iteration has been benchmarked to be a=10-7 if run on a machine performing a single task at a time. What is the expected running time for a single search on this machine? Is that satisfactory? Consider that such searches normally happen concurrently for multiple threads at the same time (think efficiency/throughput/latency).
Repeat the above exercise for binary search.
The solutions to any two of the following four exercises should be handed in to the course pigeon hole, before Wednesday, February 7, 13:00 [expected time 2—3h]