News:

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

CmpI

Started by Jimg, June 27, 2005, 04:32:07 PM

Previous topic - Next topic

Jimg

Hutch-

Ok, we're getting close.  I took szCmpi5 assuming this is your favorite, and added the code to remove one compare from each loop (szCmpi5x).
I compiled three times, once using your code to change the case of every letter in both buffers for the worst possible match, which I called Bmark1.exe
Once changing the case on only one buffer so there was about a 50% mismatch, which I called Bmark2.exe
And once with no changes so buffers are identical, called Bmark3.exe.  The results are remarkable consistent, and 15 to 20 percent faster on AMD.
How do they test on fast Pentiums?

Bmark1.exe
Total mismatch:
    mov hmem, lcase$(hmem)  ; changed every letter to a mismatch
    mov hbuf, ucase$(hbuf)

109 MS average for szCmpi5
93 MS average for szCmpi5x

------------------------------------------------------------------ 

Bmark2.exe
Half mismatch:

    mov hmem, lcase$(hmem)  ;only changed one copy of file
;   mov hbuf, ucase$(hbuf)                                       

110 MS average for szCmpi5
94 MS average for szCmpi5x

Press ENTER to exit
-----------------------------------------------------------
No mismatch:

    ;mov hmem, lcase$(hmem)  ; identical buffers, no changes
    ;mov hbuf, ucase$(hbuf)

109 MS average for szCmpi5
95 MS average for szCmpi5x


[attachment deleted by admin]

hutch--

Jim,

I get the same results on all 3.


140 MS average for szCmpi5
156 MS average for szCmpi5x


Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Jimg

Interesting.  I dusted off an old celeron and this is what I got--

Celeron 2.00Ghz 496 MB ram

188 MS average for szCmpi5
187 MS average for szCmpi5x

hutch--

Jim,

Will you answer the PM I sent you, I need the info.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Jimg

Gee, I never think to check for those, shouldn't it ring a bell or something??  :wink

I just went and looked.  I had send me an email checked but I didn't see any email..  I changed it so now I have do a popup checked.  Maybe that will work....