Really, I cheated - I lowered the loop count to 100. So, the odds of the OS getting in the way are almost nil. Still off by 1 cycle - wonder where that is coming from?

P3 600Mhz at work (I had to minimize the
debug window on NT4 to get these zeros):
OverHead: 149 cycles/byte

MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
Posted on 2002-03-04 11:30:16 by bitRAKE


OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles


very consistent on my athlon xp 1800
Posted on 2002-03-04 17:08:27 by mc`
Windows 98 2nd edition 600mhz

OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
Posted on 2002-03-04 18:19:06 by Sliver
Sliver, what CPU is that? Wow, four cycles off!
Well, atleast it's consistent. :)
Posted on 2002-03-04 18:36:17 by bitRAKE
Pentium 3

....

I feel kinda left out :(
Semms to work on everyone else's

Sliver
Posted on 2002-03-04 20:13:23 by Sliver
Win98 SE P3 450
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles
OverHead: 136 cycles/byte
MyPROC: 1 bytes, 100 loops, 400 cycles


That is why I didnt upgraded to 600mhz :grin:
Posted on 2002-03-05 05:56:58 by LaptoniC
Back at my AMD TB with your latest version:

OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 78 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
Posted on 2002-03-05 09:48:53 by Qweerdy
P1 = 1, overhead 57
P2 = 0, overhead 128
P3 = 4, overhead 136
P3 = 0, overhead 149
P4 = ?
K7 = 0, overhead 78

Could someone with a P2 or P4 test the code?
Posted on 2002-03-05 10:24:13 by bitRAKE
p2 350Mhz windows xp


OverHead: 128 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 128 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 128 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 128 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 128 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 128 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 128 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
Posted on 2002-03-05 10:44:41 by eko
Here's my new results:



OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 1 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 1 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte
MyPROC: 1 bytes, 100 loops, 0 cycles
OverHead: 149 cycles/byte


I didn't copy the whole thing, it was too long but the results of those were 0.

Looks good to me than the first one. :alright:
Posted on 2002-03-05 14:25:05 by stryker
There definitely are two types of P3's being used here. :)
Posted on 2002-03-05 14:27:37 by bitRAKE
My P3 specs:

Intel P3 FCPGA at 802mhz (I tested it on some benchmark-ers, nah! this one is really 800mhz) x86 Family 6 Model 8 Stepping 6

edit()
I told you my PC is buggy! :) - OFFTOPIC: My PC shuts down if I don't login within 2 minutes since the enter password prompt (win2k) pops up.

edit()

Why not cheat, subtract 1 if the result is 1 -> too lame. Should we trash our P3 boxes? :)
Posted on 2002-03-05 14:33:12 by stryker
Timing algos isn't a problem if you don't mind waiting - use a large number of itterations and find the average. My goal was to find a quicker way. Both methods have their limitations.
Posted on 2002-03-05 15:00:10 by bitRAKE
Find the average?

I tried it 100 times. The counted all cycles and the average cycle throughout the entire experiment is 0.47. I don't know if this is what you want.
Posted on 2002-03-05 15:12:20 by stryker
stryker, thanks for posting your results. About the average, I was speaking in a general sense about timing algos. The above experiment is meant to measure nothing - it's a start. When trying to measure longer routines the OS seems to always get in the way, as Hutch-- stated above.

You could try timing some code by putting it between the startTime and stopTime macros. I have a couple MUL instructions commented out right now. I was able to time small pieces of code very accurately - like the little challenges Svin has posted.
Posted on 2002-03-05 15:50:54 by bitRAKE