News:

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

Trace Stack Test

Started by dedndave, August 24, 2010, 05:46:18 PM

Previous topic - Next topic

dedndave

here is a simple test to compare POP ECX|JMP ECX with RET
i use a recursive routine to load the trace stack, then execute the selected test routine

result on a prescott w/htt
Intel(R) Pentium(R) 4 CPU 3.00GHz (SSE3)

JMP ECX

175     clock cycles
181     clock cycles
177     clock cycles
175     clock cycles
180     clock cycles

RET

113     clock cycles
114     clock cycles
114     clock cycles
113     clock cycles
116     clock cycles

Neil

Intel Quad CPU Q9550 @2.83 GHz (SSE4)

JMP ECX

85          clock cycles
86          clock cycles
86          clock cycles
86          clock cycles
86          clock cycles

RET

41          clock cycles
43          clock cycles
43          clock cycles
43          clock cycles
43          clock cycles

dioxin

AMD Phenom(tm) II X4 945 Processor (SSE3)

JMP ECX

90      clock cycles
90      clock cycles
90      clock cycles
90      clock cycles
90      clock cycles

RET

60      clock cycles
60      clock cycles
60      clock cycles
60      clock cycles
60      clock cycles

dedndave

thanks guys
it looks like that works as documented
messing up the trace stack has a penalty
i wonder how it will look on a PIII

jj2007

Intel(R) Celeron(R) M CPU        420  @ 1.60GHz (SSE3)
JMP ECX  76 clock cycles
RET      45 clock cycles

FORTRANS

Hi,

   PIII as requedted.

Regards,

Steve N.


G:\WORK>tstest
pre-P4 (SSE1)

JMP ECX

86      clock cycles
86      clock cycles
86      clock cycles
86      clock cycles
86      clock cycles

RET

62      clock cycles
62      clock cycles
62      clock cycles
62      clock cycles
62      clock cycles

Press any key to continue ...


P MMX since it ran.


pre-P4
JMP ECX

95 clock cycles
95 clock cycles
95 clock cycles
95 clock cycles
95 clock cycles

RET

90 clock cycles
90 clock cycles
90 clock cycles
90 clock cycles
90 clock cycles

Press any key to continue ...



Antariy

Hi, Dave!

This is my timings:

Intel(R) Celeron(R) CPU 2.13GHz (SSE3)

JMP ECX

176     clock cycles
176     clock cycles
176     clock cycles
175     clock cycles
174     clock cycles

RET

118     clock cycles
118     clock cycles
117     clock cycles
118     clock cycles
119     clock cycles

Press any key to continue ...


I confidense, what even on 8086 "pop ecx; jmp ecx" CANNOT be faster, because software work CANNOT beat hardware work (CPU implemention of restoring stack and changing of (E)IP). On new CPUs, with prediction mechanic, this is cannot be faster in anyway, in real world (in "clock-test" this might have not very big difference, because macro use cpuid).



Alex

dedndave

thanks guys
i didn't know you had a pentium mmx, Steve - lol
i have one here, too, although it isn't connected to the internet
i use it for troubleshooting, mostly
it's a 200 MHz, but it runs win98 ok at 225   :P

Antariy

Quote from: dedndave on August 24, 2010, 08:53:09 PM
thanks guys
i didn't know you had a pentium mmx, Steve - lol
i have one here, too, although it isn't connected to the internet

Dave, novadays even hand calculators have connection to internet  :P
Need to modernize your PMMX  :P



Alex

dedndave

well - it's just a tool, really
i can plug any old IDE drive in it and it will recognize it
same for older video and sound cards, as well as floppy drives
i am used to XP, now - i don't want to work on win98, any more - lol
i have a NIC for it - but no wireless
i am too lazy to run the cable - lol

Antariy

Quote from: dedndave on August 24, 2010, 09:00:01 PM
well - it's just a tool, really
i can plug any old IDE drive in it and it will recognize it
same for older video and sound cards, as well as floppy drives
i am used to XP, now - i don't want to work on win98, any more - lol
i have a NIC for it - but no wireless
i am too lazy to run the cable - lol

Sorry, Dave, this is *joke* only.
I also desire have old hardware for testing, but I cannot find them.



Alex

FORTRANS

Hi Dave,

Quote from: dedndave on August 24, 2010, 08:53:09 PM
thanks guys
i didn't know you had a pentium mmx, Steve - lol

   I believe I posted some results before.  I think it was
for a CPU ID program?  Anyway...

Quote
i have one here, too, although it isn't connected to the internet
i use it for troubleshooting, mostly
it's a 200 MHz, but it runs win98 ok at 225   :P

   Mine can hook to the internet with a PCMCIA NIC, but it is
floppy SneakerNet for now.  166 MHz laptop with Win 98.
LOL indeed.

Cheers,

Steve

Antariy

Quote from: FORTRANS on August 24, 2010, 09:09:09 PM
   Mine can hook to the internet with a PCMCIA NIC, but it is
floppy SneakerNet for now.  166 MHz laptop with Win 98.
LOL indeed.

This is not HP's white-color notebook with green track-point? I see that once.



Alex

hutch--

Dave,


Intel(R) Core(TM)2 Quad CPU    Q9650  @ 3.00GHz (SSE4)

JMP ECX

86      clock cycles
86      clock cycles
86      clock cycles
86      clock cycles
86      clock cycles

RET

43      clock cycles
43      clock cycles
43      clock cycles
43      clock cycles
43      clock cycles

Press any key to continue ...
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

FORTRANS

Quote from: Antariy on August 24, 2010, 09:36:45 PM
This is not HP's white-color notebook with green track-point? I see that once.

Hi Alex,

   No.  It is an HP OmniBook 800 with the "paw" style mouse.
The mouse pops out of the side on a strip of plastic.  Dark
gray case.

Regards,

Steve