Author Topic: Timing Macro's  (Read 3804 times)

0 Members and 1 Guest are viewing this topic.

MikeTrader

  • Guest
Timing Macro's
« on: January 03, 2008, 01:25:28 AM »
Charles,
I assume this timing code is not High Priority?
Code: [Select]
  ! 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


Offline Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 704
    • Charles Pegge
Re: Timing Macro's
« Reply #1 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.