[comp.os.msdos.programmer] how to get the most accurate program timings

fester@CPAC.WASHINGTON.EDU (01/22/91)

What is the best way to get really accurate program timings ?  Is
Microsoft C's  CLOCK() library routine good enough, does TurboC have
something better, should I be writing an assembly routine that uses
a totally undocumented system call (:-)), what ?  If anyone out
there has had to work with really accurate timings, how did you do it ?

LeaF
fester@yin.cpac.washington.edu  (mail or posting responses is fine.  thanks.)

raymond@math.berkeley.edu (Raymond Chen) (01/22/91)

In article <9101220039.AA06964@yin.cpac.washington.edu>, fester@CPAC writes:
>What is the best way to get really accurate program timings ?  

Most people will refer you to the book `The Zen of Assembler'.  Here
are the reviews it has received from the net.

@book{ma:zen
    author = "Michael Abrash",
    title = "The {Z}en of Assembler",
    publisher = {Scott, Foresman and Company},
    address = {Glenview, Illinois},
    year = 1990,
    ISBN = {0-673-38602-3}
}

    Volume 2 is scheduled for sometime in 1990.

    "A good discussion of reprogramming timer 0 in Chapter 2." 
        -- David J. Birnbaum (djb@wjh12.harvard.edu)

    "A super accurate timer is presented (actually a short- and a long-term
     timer) along with an explanation of their operation."
	-- John Mitchell (johnm@sim.Berkeley.EDU)

   "Abrash actually develops two timers in his book.  The higher accuracy
    timer requires you to turn off all interupts.  Its primary purpose is
    to time small sections of assembly code.  For timing full programs Abrash
    has a long term timer of more questionable accuracy.  However, it is still
    a book that anyone with more than a passing interest in assembly should
    read.  ... If you are considering learning assembly you might look at this
    series."
        --- Tom Webb (webb@uhccux.uhcc.Hawaii.Edu)

--------------------

Other books and net.recommendations can be obtained from the
comp.sys.ibm.pc.misc ftp site (math.princeton.edu) or via
mail server (see the Frequently Asked Questions file) in the
file `books'.