I did a code to multiply two matrixes. I don't know how to measure (seconds) that the operation gets. Thanks if someone can help me. :rolleyes: The code:

.data ;~~~~~~~~~~~~~~Data section

  pA  QWORD 1.5,2.5,3.5
      QWORD 1.7,2.7,3.7
      QWORD 1.9,2.9,3.9

  pB  QWORD 5.1,5.2,5.3
      QWORD 7.1,7.2,7.3
      QWORD 9.1,9.2,9.3

.code ;~~~~~~~~~~~~~~Code section (A <- A x B)

  lea edi,pA
  lea esi,pB
  finit
  mov eax,3
  nxtrow:
    mov ecx,3
    nxtcol:
      fld QWORD PTR 
     fmul QWORD PTR 
      fld QWORD PTR [8]
     fmul QWORD PTR [24]
     fadd
      fld QWORD PTR [16]
     fmul QWORD PTR [48]
     fadd 
      add esi,8
    dec ecx
    jnz nxtcol
    fstp QWORD PTR [16]
    fstp QWORD PTR [8]
    fstp QWORD PTR 
     sub esi,24
     add edi,24
  dec eax
  jnz nxtrow
(thanks Zadkiel for instructions) :)
Posted on 2001-04-14 18:31:00 by wolfao
GetTickCount before and after. Then sub the first return value from the last. Actually it's quite inaccurate. You need clocks or High perform timer. I post ~ 15 times how to do it. Hope someone else would anwered the posted ready code.
Posted on 2001-04-16 01:58:00 by The Svin
Svin's right, I made a macro set out of Svin's clocking code...

      TESTCLOCKS_ON MACRO
          db 0fh,31h 
          push edx       ; push high
          push eax       ; push low
      ENDM
      
      TESTCLOCKS_OFF MACRO
          db 0fh,31h 
          pop ebx        ; pop low
          pop ecx        ; pop hight
          sub eax,ebx    ; diff low
          sbb edx,ecx    ; diff high
      ENDM
Basic usage..

TESTCLOCKS_ON
  ; test code goes here
TESTCLOCKS_OFF
  ; 64 bit number of the # of clocks taken by the cpu...  (EDX:EAX)
I use it in a while loop, because i found the first time threw on my machine gives a largely delayed numbers (dont know why...) but on the second and third repitions it produces useable stats.. NaN
Posted on 2001-04-16 02:23:00 by NaN
Guys, the technique I use for clocking algorithms is based on the problems of ring3 interference. RDTSC has very high resolution but it suffers from the same interference that and ring3 code does, lower priority that OS code. GetTickCount() has a nominal 1 millisecond resolution so it is of little use for short intervals but if you set up the code you are testing so that it runs for over 500 milliseconds, the error percentage starts to become very low. It is a convenient way to repeatedly test and algorithm which you are changing regularly and once the sample size is big enough, the accuracy is good enough. Regards, hutch@pbq.com.au
Posted on 2001-04-16 02:55:00 by hutch--
I'll say the same words as you did but in different order. GetTickCount the same interference as RDTSC. But RDTSC has much better resolution. So RDTSC is much more precize. Actually with short test 20 millisec is long enough to run loop with short algo many times. And if you don't move and click at the time and have no progs running there threads you'll get quite accurate result. And you can change slice size to 60 millisecs that will do even better. The Svin.
Posted on 2001-04-16 04:28:00 by The Svin