Powerbasic Museum 2020-B

IT-Consultant: Charles Pegge => Discussion => Topic started by: MikeTrader on January 03, 2008, 01:25:28 AM

Title: Timing Macro's
Post by: MikeTrader on January 03, 2008, 01:25:28 AM
Charles,
I assume this timing code is not High Priority?
  ! mov ebx,tick              ' var address where count is to be stored.
  ! db  &h0f,&h31             ' RDTSC read time-stamp counter into edx:eax hi lo.
  ! mov [ebx],eax             ' save low order 4 bytes.
  ! mov [ebx+4],edx           ' save high order 4 bytes.


What do you think of using HIGH_PRIORITY_CLASS for timing Macro's
http://www.masm32.com/board/index.php?topic=770.0

Title: Re: Timing Macro's
Post by: Charles Pegge on January 03, 2008, 10:43:18 AM
Reading around, I would say that the user has very little control over the operating system.  Even the CPU makes its own scheduling decisions. So to measure performance realistically, the only way is to do controlled experiments.

Inserting and removing test code or substituting one function for another, but not attempting to change the PRIORITY_CLASS, will give a fair measurement of performance.