News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Timing for times-ten table generator

Started by dedndave, July 22, 2009, 01:18:41 AM

Previous topic - Next topic

jj2007

Quote from: dedndave on July 22, 2009, 04:04:52 PM
that is SO stupid !!!! - lol
fix windows - not the processor that wasn't broken to begin with - lol

anyways, i updated the Table10 program again
this time, i made the times update on a static screen until a key is pressed

if you liked the green, Jochen, you'll love this
(better put another one on ice)

Yeah, looks nice, and seems to like my Celeron :U

Total System Processor Cores: 1
CPU 0: Intel(R) Celeron(R) M CPU        420  @ 1.60GHz MMX SSE3 Cores: 1
7981    clock cycles
7948    clock cycles
7938    clock cycles

bruce1948


DednDave Times Ten Table Generator

Total System Processor Cores: 1
CPU 0: AMD Sempron(tm)   3000+ MMX+ SSE 3DNow!+ Cores: 1
7241    clock cycles
7172    clock cycles
7161    clock cycles

Generated table values are identical to Masm-assembled table values
Code: 172 bytes
Data:  38 bytes
Total: 210 bytes
Press any key to continue ...

jj2007

Just timed my own routine - it's a lot slower than Dave's algo, arouind 8,600 cycles. At 1.6 Giga, that means roughly 0.005 milliseconds. Fortunately, it has to run only once :bg

dedndave

QuoteFortunately, it has to run only once
i can't believe you said that - lol - that's just not like you, Jochen
still, you beat me by 22 bytes - fair and square
i had to work hard to get it down to that
did you see that i had to pack the correction table ? - lol

MichaelW

Everything works on my P3 now, and it's ~8% faster.

Total System Processor Cores: 1
CPU 0: Fam 6 Mod 7 xFam 0 xMod 0 Type 0 Step 3 MMX SSE Cores: 1
8328    clock cycles
8328    clock cycles
8328    clock cycles


One problem with the continual update is that it's difficult to copy the output without affecting one or more of the cycle counts.

eschew obfuscation

dedndave

yes - i noticed that Michael
console mode copy/paste is very strange
the best way is to exit the program, then get the last set
maybe i should put several timing text lines in it, instead of 3

dedndave

i added more lines
also, i found a couple small flaws
i released the heap before i was done with it - oops - i am surprised i didn't see my c0000005 friend (that should be my nic)
also, using Michael's timing routine requires push/pop ebx if in a function - unless they use the updated counter2 file
so, i added push/pop

playing around with the console mode copy/paste is always a disappointment
i swear - i have tried everything to simply disable it altogether, with no luck
i have found three bugs - at least in the XP MCE 2005 console window
they may have been fixed in later OS's
again, the best thing to do is to stop the program before using copy/paste
i am going to leave that part as it is and work on the EnumerateCPUs function if i have time
Thanks to Everyone for your help  :U


dedndave

thank you, Bruce
i did wind up using the AMD method
they outline the same info in their CPUID reference manual