The MASM Forum

General => The Laboratory => Topic started by: hutch-- on June 04, 2012, 01:34:27 AM

Title: Benchmark for DWORD to ASCII algorithms
Post by: hutch-- on June 04, 2012, 01:34:27 AM
The attached file has a benchmark to test a collection of conversion algorithms. The result for the test is written to BMLOG.TXT.

These are the results on my dev Core2 quad.

Code: [Select]
Intel(R) Core(TM)2 Quad CPU Q9650 @ 3.00GHz
Results 8 pass average
timing Ray original utoa 234 ms
timing Paul Dixon utoa_ex 78 ms
timing brethren utoa2 172 ms
timing Lingo utoa_ex 78 ms
timing msvc ustr$ 391 ms
timing Ray modified utoa3 234 ms
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: dedndave on June 04, 2012, 01:47:11 AM
prescott w/htt
Code: [Select]
Intel(R) Pentium(R) 4 CPU 3.00GHz
Results 8 pass average
timing Ray original utoa   468 ms
timing Paul Dixon utoa_ex  175 ms
timing brethren utoa2      343 ms
timing Lingo utoa_ex       173 ms
timing msvc ustr$         1707 ms
timing Ray modified utoa3  466 ms
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: jj2007 on June 04, 2012, 03:18:45 AM
rsrc.rc, line 21 might require a tiny change:

Code: [Select]
chokes on some puters: #include "H:/masm32/INCLUDE/resource.h"
heals the problem: #include "/masm32/INCLUDE/resource.h"
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: hutch-- on June 04, 2012, 03:28:50 AM
 :biggrin: Yep.
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: RuiLoureiro on June 04, 2012, 06:33:36 AM
Intel(R) Pentium(R) 4 CPU 3.00GHz
Results 8 pass average
timing Ray original utoa      533 ms
timing Paul Dixon utoa_ex  197 ms
timing brethren utoa2       390 ms
timing Lingo utoa_ex         189 ms
timing msvc ustr$             1896 ms
timing Ray modified utoa3  517 ms
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: dedndave on June 04, 2012, 11:37:56 AM
which ever algo you choose, 4294967296 possible values isn't too many to do a complete functional test
(i.e., verify correct output strings for 4294967296 cases)   :biggrin:

sometimes the fastest algo is fast because it isn't doing what it's supposed to - lol
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: hutch-- on June 04, 2012, 02:12:55 PM
Everybody has a theory,the algo do as the algos do. From memory I tested all of them over the DWORD range and all are correct.
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: Obivan on June 04, 2012, 06:57:32 PM
Code: [Select]
Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Results 8 pass average
timing Ray original utoa 199 ms
timing Paul Dixon utoa_ex 68 ms
timing brethren utoa2 146 ms
timing Lingo utoa_ex 66 ms
timing msvc ustr$ 423 ms
timing Ray modified utoa3 185 ms
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: jcfuller on June 04, 2012, 07:26:47 PM
Code: [Select]
AMD Athlon(tm) II X2 250 Processor
Results 8 pass average
timing Ray original utoa 341 ms
timing Paul Dixon utoa_ex 136 ms
timing brethren utoa2 206 ms
timing Lingo utoa_ex 140 ms
timing msvc ustr$ 781 ms
timing Ray modified utoa3 343 ms
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: FORTRANS on June 04, 2012, 10:22:09 PM
Hi,

   P-III with Windows 2000.  P-MMX with Windows 98.

Regards,

Steve N,

Code: [Select]

Results 8 pass average
timing Ray original utoa 1526 ms
timing Paul Dixon utoa_ex 687 ms
timing brethren utoa2 1037 ms
timing Lingo utoa_ex 604 ms
timing msvc ustr$ 4462 ms
timing Ray modified utoa3 1387 ms


Results 8 pass average
timing Ray original utoa 13400 ms
timing Paul Dixon utoa_ex 7847 ms
timing brethren utoa2 9074 ms
timing Lingo utoa_ex 8019 ms
timing msvc ustr$ 41197 ms
timing Ray modified utoa3 13788 ms
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: Ghandi on June 05, 2012, 09:53:56 PM
Hi,

Running Windows 7 x64:

Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
Results 8 pass average
timing Ray original utoa 193 ms
timing Paul Dixon utoa_ex 78 ms
timing brethren utoa2 142 ms
timing Lingo utoa_ex 78 ms
timing msvc ustr$ 392 ms
timing Ray modified utoa3 175 ms

HR,
Ghandi
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: hutch-- on June 05, 2012, 10:18:42 PM

Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz
Results 8 pass average
timing Ray original utoa 265 ms
timing Paul Dixon utoa_ex 78 ms
timing brethren utoa2 171 ms
timing Lingo utoa_ex 62 ms
timing msvc ustr$ 436 ms
timing Ray modified utoa3 234 ms
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: Greenhorn on June 06, 2012, 09:16:57 AM
AMD FX(tm)-8150 Eight-Core Processor
Results 8 pass average
timing Ray original utoa 290 ms
timing Paul Dixon utoa_ex 81 ms
timing brethren utoa2 171 ms
timing Lingo utoa_ex 78 ms
timing msvc ustr$ 508 ms
timing Ray modified utoa3 255 ms


Regards
Greenhorn
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: KeepingRealBusy on June 06, 2012, 10:06:21 AM
Here is my laptop.

Intel(R) Pentium(R) 4 CPU 3.20GHz
Results 8 pass average
timing Ray original utoa 1090 ms
timing Paul Dixon utoa_ex 312 ms
timing brethren utoa2 595 ms
timing Lingo utoa_ex 353 ms
timing msvc ustr$ 1456 ms
timing Ray modified utoa3 732 ms

Dave.
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: KeepingRealBusy on June 06, 2012, 10:26:23 AM
Here is my desktop.

AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Results 8 pass average
timing Ray original utoa 587 ms
timing Paul Dixon utoa_ex 146 ms
timing brethren utoa2 355 ms
timing Lingo utoa_ex 178 ms
timing msvc ustr$ 1728 ms
timing Ray modified utoa3 617 ms

Dave.
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: herge on June 11, 2012, 10:37:44 PM
Hi Every One:

Intel(R) Core(TM)2 Duo CPU E4600 @ 2.40GHz
Results 8 pass average
timing Ray original utoa 314 ms
timing Paul Dixon utoa_ex 113 ms
timing brethren utoa2 226 ms
timing Lingo utoa_ex 99 ms
timing msvc ustr$ 748 ms
timing Ray modified utoa3 308 ms

Regards herge
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: User12 on June 12, 2012, 02:03:49 PM
Code: [Select]
Intel(R) Core(TM)2 Quad CPU Q9650 @ 3.00GHz
Results 8 pass average
timing Ray original utoa 234 ms
timing Paul Dixon utoa_ex 78 ms
timing brethren utoa2 172 ms
timing Lingo utoa_ex 78 ms
timing msvc ustr$ 390 ms
timing Ray modified utoa3 234 ms

Ah actually, this isn't quite right, CPU is Core 2 Quad Q6600 2.4Ghz. The CPUID posted here (http://masm32.com/board/index.php?topic=189.0) in the original topic identifies the CPU just fine...
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: jj2007 on June 12, 2012, 03:14:44 PM
Code: [Select]
Intel(R) Core(TM)2 Quad CPU Q9650 @ 3.00GHz
Ah actually, this isn't quite right, CPU is Core 2 Quad Q6600 2.4Ghz. The CPUID posted here (http://masm32.com/board/index.php?topic=189.0) in the original topic identifies the CPU just fine...
Wow, so these cloners managed to write two different brand strings into your CPU :dazzled:
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: dedndave on June 12, 2012, 11:51:52 PM
i was gonna say something about that, but the subject isn't really pertinent to this thread   :P
he should go over to the CPUID thread and post displayed results from the different CPUID test programs

User12: those string are typically taken from the CPU internal registers
if you get 2 different results, it may be that one of the programs does not access the internal string

i am going to go out on a limb, here, and guess that this one is correct
Code: [Select]
Intel(R) Core(TM)2 Quad CPU Q9650 @ 3.00GHz
could it be that you are using 2 different machines ?   :P
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: FORTRANS on June 12, 2012, 11:54:24 PM
Code: [Select]
Intel(R) Core(TM)2 Quad CPU Q9650 @ 3.00GHz
Ah actually, this isn't quite right, CPU is Core 2 Quad Q6600 2.4Ghz. The CPUID posted here (http://masm32.com/board/index.php?topic=189.0) in the original topic identifies the CPU just fine...
Wow, so these cloners managed to write two different brand strings into your CPU :dazzled:

Hi,

   Would that explain why the code does not run on one
of my machines?

Regards,

Steve N.
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: dedndave on June 12, 2012, 11:56:10 PM
Steve - what CPU is in the machine that will not run it ?
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: FORTRANS on June 13, 2012, 12:20:55 AM
Hi Dave,

   My bad.  This is the wrong thread.  It was the CMP versus
CMPS thread.  Anyway, a Mobile Intel(R) Celeron(R) processor,
in a Sony Vaio.

Oops,

Steve
Title: Re: Benchmark for DWORD to ASCII algorithms
Post by: User12 on June 13, 2012, 09:35:10 AM
Quote
Wow, so these cloners managed to write two different brand strings into your CPU :dazzled:
Doh! Not quite... It seems Windows doesn't update files in a zip file like WinRar, I ended up copying the contents of the bmlog.txt file that already exists... :redface: ...Back to the results...

Quote
i am going to go out on a limb, here, and guess that this one is correct
Close, I mean it was a 50/50, but nah, it's the Q6600... :D

U12.