Author Topic: Benchmark for DWORD to ASCII algorithms  (Read 7752 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4813
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Benchmark for DWORD to ASCII algorithms
« 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
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: Benchmark for DWORD to ASCII algorithms
« Reply #1 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

jj2007

  • Member
  • *****
  • Posts: 7558
  • Assembler is fun ;-)
    • MasmBasic
Re: Benchmark for DWORD to ASCII algorithms
« Reply #2 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"

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4813
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Benchmark for DWORD to ASCII algorithms
« Reply #3 on: June 04, 2012, 03:28:50 AM »
 :biggrin: Yep.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: Benchmark for DWORD to ASCII algorithms
« Reply #4 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

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: Benchmark for DWORD to ASCII algorithms
« Reply #5 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

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4813
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Benchmark for DWORD to ASCII algorithms
« Reply #6 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

Obivan

  • Regular Member
  • *
  • Posts: 3
Re: Benchmark for DWORD to ASCII algorithms
« Reply #7 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

jcfuller

  • Member
  • **
  • Posts: 175
Re: Benchmark for DWORD to ASCII algorithms
« Reply #8 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

FORTRANS

  • Member
  • ****
  • Posts: 945
Re: Benchmark for DWORD to ASCII algorithms
« Reply #9 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

Ghandi

  • Guest
Re: Benchmark for DWORD to ASCII algorithms
« Reply #10 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

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4813
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Benchmark for DWORD to ASCII algorithms
« Reply #11 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
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

Greenhorn

  • Member
  • **
  • Posts: 93
Re: Benchmark for DWORD to ASCII algorithms
« Reply #12 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

KeepingRealBusy

  • Member
  • ***
  • Posts: 426
Re: Benchmark for DWORD to ASCII algorithms
« Reply #13 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.

KeepingRealBusy

  • Member
  • ***
  • Posts: 426
Re: Benchmark for DWORD to ASCII algorithms
« Reply #14 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.