hrtime.e requires an Intel Pentium+ or compatible processor.  

All tests were run on an Intel Pentium III 450MHz, 128MB PC100 SDRAM,
        Win98SE system, using Euphoria 2.5b.

Testing under Windows was done with an absolute minimum of background
        activity (except for infinite cpu loop running during wcihrt.txt.)

File List:

hrtime.e        - High Resolution Time code.
                  Only references Eu 2.4+ std Include libraries
                  Many comments.  Refer first to this code if you
                  have any questions.  If any questions remain, please
                  post them on Euforum.

testhrt.ex      - Tests for hrtime.e.
                  Illustrates how to use hrtime() function to
                  perform high resolution elapsed timing of various
                  operations which may be of interest.

dhrt.txt        - Timings under straight DOS.
                  Use the following command:
                    ex testhrt.ex xx > dhrt.txt
                  where "xx" is dummy parameter to bypass HLT timing
                  which will cause crash in DOS, and "dhrt.txt" is
                  file where you want to store results.

wdhrt.txt       - Timings under Win32 DOS box via ex.exe
wchrt.txt       - Timings under Win32 console via exw.exe
wcihrt.txt      - as in wchrt.txt, but with an infinite loop running
                    in the background (via exw.exe infloop.ex)

infloop.ex      - Infinite loop code

tsc.txt         - Shows capacity of the Pentium+ TimeStampCounter (TSC)
                  at various CPU speeds, and time after which hrtime(),
                  which returns the TimeStampCounter as a double float
                  (64 bit float), will lose precision.

                  Note: The TSC is reset to zero by a power off/on cycle.

tscvsdbl.ex     - Program which computes data for tsc.txt (tsc vs dbl float)
                  See comments at start of program for discussion of the
                  TimeStampCounter

readme.txt      - This file


Some observations based on my testhrt.ex results:

DOS32 applications still pay a speed penalty when using float.
        See wdhrt.txt vs wchrt.txt for timings on float.

"call(HLT)" returns quickly to app when there is no background load
        (at least under Win32) but can take multiple ticks (timeslices)
        when there is processor intensive background processes active.
        See wchrt.txt vs wcihrt.txt re HLT.

Measuring CPU speed can be iffy. Although I have tried to design the code
        to work reliably and accurately, I have not tested it on Linux
        or any of the Windows XP, 2000, or NT systems, or on any
        dual processor system.

I would like to see results of testhrt.ex run on Linux, FreeBSD, Win (XP,
        NT, 2000.)

If you have any questions, comments, testhrt.ex runs on various CPUs, systems,
        etc.. please post them on Euforum.

Likewise, please post results of any timing experiments you may run which
        might be of interest to the Euphoria community.

Enjoy,

Verne S. Tice

p.s. Thanks go to Pete Eberlein and Mic for the excellent asm.e,
        and to Daniel Kluss for his cputime.e which inspired me to
        work on hrtime.e



        


   
  




