News:

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

Faster Bin2ASCII

Started by lingo, March 26, 2008, 01:07:37 PM

Previous topic - Next topic

lingo

I rewrote speed optimized
"Binary-to-ASCII Decimal Conversion Suppressing Leading Zeros" algo
by  AMD (see AMD  Software Optimization Guide 25112.pdf)
As a result I have 88 instructions  vs 101 instructions from AMD and my time is:
P4 3.6 GHz, 2GB RAM,  Vista Ultimate with SP1 
156 cycles, bin2ascii-AMD
92 cycles, bin2ascii-lingo
Press any key to exit...

P4 3.6 GHz, 2GB RAM,  Windows XP Pro with SP2 
123 cycles, bin2ascii-AMD
95 cycles, bin2ascii-lingo
Press any key to exit...


Pls, delete your old zip and download new one again.

Regards,
Lingo



[attachment deleted by admin]

thomas_remkus

134 cycles, bin2ascii-AMD
126 cycles, bin2ascii-lingo


XP Pro SP2
Intel 2.8GHz
1.25GB RAM

lingo

try again and again until you receive better results... :wink

jj2007

Me trying hard, too  :wink

134 cycles, bin2ascii-AMD
127 cycles, bin2ascii-lingo

XP SP1, 512 MB Ram

MichaelW

Intel P3, Win2k SP4:

72 cycles, bin2ascii-AMD
62 cycles, bin2ascii-lingo

eschew obfuscation

Ossa

51 cycles, bin2ascii-AMD
43 cycles, bin2ascii-lingo


AMD 64 Mobility Athlon 3400+
512MB RAM
Win XP Home (SP2) (32-bit)

Ossa
Website (very old): ossa.the-wot.co.uk

hutch--

3.2 gig Prescott 800 meg fsb.


123 cycles, bin2ascii-AMD
95 cycles, bin2ascii-lingo
Press any key to exit...


LATER

Here is the timing on my 2.8 gig Northwood.


133 cycles, bin2ascii-AMD
121 cycles, bin2ascii-lingo
Press any key to exit...


It appears the code in your latest version favours the later Intel hardware, I would be interested to see how it performed on both late AMD and Intel Core2 Duos.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

lingo

Thanks Hutch,
My CPU is Prescott too, so
I receive the similar results  :wink

To All: Pls, reload the last one zip file 

jj2007

Compliments, Lingo!

XP SP2, Pentium 4 3.4 GHz, 1.5 G RAM

221 cycles, bin2ascii-AMD
147 cycles, bin2ascii-lingo

149 cycles, bin2ascii-AMD
95 cycles, bin2ascii-lingo

149 cycles, bin2ascii-AMD
97 cycles, bin2ascii-lingo

149 cycles, bin2ascii-AMD
97 cycles, bin2ascii-lingo

149 cycles, bin2ascii-AMD
95 cycles, bin2ascii-lingo

Ossa

51 cycles, bin2ascii-AMD
48 cycles, bin2ascii-lingo


(same setup as before).

AMD 64 Mobility Athlon 3400+
512MB RAM
Win XP Home (SP2) (32-bit)

that's worse than before for me (it was 43 cycles last time).

Ossa
Website (very old): ossa.the-wot.co.uk

MichaelW

The new version is a little slower on my P3:

72 cycles, bin2ascii-AMD
65 cycles, bin2ascii-lingo

eschew obfuscation

GregL

Pentium D 940 (3.2 GHz)

123 cycles, bin2ascii-AMD
95 cycles, bin2ascii-lingo


thomas_remkus


jj2007

120 cycles, bin2ascii-AMD
96 cycles, bin2ascii-lingo

Celeron 2.4 GHz, 448 MB RAM, XP SP1

The P4 on my office box (SP2) is slower for AMD, see above

u

Sempron 3000+

51 cycles, bin2ascii-AMD
48 cycles, bin2ascii-lingo
Please use a smaller graphic in your signature.