This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ation of less than 100 ms. On this machine they have a systematic bias, overestimating computation times by an average of around 4%. The main virtue of this timing mechanism is that its accuracy does not depend strongly on the system load. 9.3 Cycle Counters
To provide greater precision for timing measurements, many processors also contain a timer that operates at the clock cycle level. This timer is a special register that gets incremented every single clock cycle. Special machine instructions can be used to read the value of the counter. Not all processors have such counters, and those that do vary in the implementation details. As a result, there is no uniform, platform-independent interface by which programmers can make use of these counters. On the other hand, with just a small amount of assembly code, it is generally easy to create a program interface for any speciﬁc machine. 460 CHAPTER 9. MEASURING PROGRAM EXECUTION TIME 9.3.1 IA32 Cycle Counters
All of the timings we have reported so far were measured using the IA32 c...
View Full Document