This preview shows page 1. Sign up to view the full content.
Unformatted text preview: not have this luxury. They must share the system with other users. Even on ¯ 482 CHAPTER 9. MEASURING PROGRAM EXECUTION TIME
heavily loaded systems, our Ã -best scheme is reasonably robust for measuring durations shorter than the timer interval. ¯ The experimental setup must control some sources of performance variations. Cache effects can greatly affect the execution time for a program. The conventional technique is to make sure that the cache is ﬂushed of any useful data before the timing begins, or else that it is loaded with any data that would typically be in the cache initially. Through a series of experiments, we were able to design and validate the Ã -best timing scheme, where we make repeated measurements until the fastest Ã are within some close range to each other. On some systems, we can make measurements using the library functions for ﬁnding the time of day. On other systems, we must access the cycle counters via assembly code. Bibliographic Notes
There is surprisingly little literature on program timing. Stevens’ U...
View Full Document
- Spring '10
- The American