1. benchmark: Eu wins again

Hi all,

*interpreted* Euphoria (2.4 beta) clearly beats *compiled* PowerBASIC
for DOS!

o I translated the benchmark program "Euphoria\demo\bench\sieve8k.exw"
  to PowerBASIC, and compiled it using version 3.2 for DOS. The
  resulting program is labeled 'PB' in the following table.

o The Eu statement
     flags = repeat(ON, SIZE)

  translates to the PowerBASIC code
     for i = 1 to %SIZE
        flags(i) = %ON
     next

  Because this obviously is slow, I made another version of the BASIC
  program, where I replaced this code by an asm routine, using 'rep
  stosw'. The resulting program is labeled 'PB+asm' in the following
  table. Interpreted Eu is also much faster than this "patched" program.


I got the following results (Pentium II 400 MHz processor, Win 98),
using the command-line parameter 90000, as described in
"Euphoria\demo\bench\":


plain DOS
-.-.-.-.-
                    time measured     speed relative to ex.exe
                    -------------     ------------------------
PB    :             897,21 sec        3.7 times slower
PB+asm:             687,39 sec        2.9 times slower
ex.exe:             241,45 sec        1



Windows
-.-.-.-
                    time measured     speed relative to exw.exe
                    -------------     -------------------------
PB     (DOS box):   904,57 sec        3.6 times slower
PB+asm (DOS box):   693,43 sec        2.7 times slower
exw.exe         :   252,89 sec        1



Disclaimer:
The latest PB/DOS version isn't 3.2, but 3.5.
32-bit PB/Windows generates faster programs than PB/DOS (I couldn't test
it, because instead of buying it, I bought Euphoria. smile

PowerBASIC Inc. claims: "PowerBASIC has long been associated with
performance". I actually think this is true, but the cool thing is,
that interpreted Euphoria is even more then 3.5 times faster than
compiled PowerBASIC/DOS!!

Best regards,
   Juergen

-- 
 /"\  ASCII ribbon campain  |    |\      _,,,---,,_
 \ /  against HTML in       |    /,`.-'`'    -.  ;-;;,_
  X   e-mail and news,      |   |,4-  ) )-,_..;\ (  `'-'
 / \  and unneeded MIME     |  '---''(_/--'  `-'\_)

new topic     » topic index » view message » categorize

2. Re: benchmark: Eu wins again

Wow ... scary...

Wonder how they (RDS) does it.

jbrown

On Sun, May 25, 2003 at 05:43:03PM +0200, Juergen Luethje wrote:
> 
> 
> Hi all,
> 
> *interpreted* Euphoria (2.4 beta) clearly beats *compiled* PowerBASIC
> for DOS!
> 
> o I translated the benchmark program "Euphoria\demo\bench\sieve8k.exw"
>   to PowerBASIC, and compiled it using version 3.2 for DOS. The
>   resulting program is labeled 'PB' in the following table.
> 
> o The Eu statement
>      flags = repeat(ON, SIZE)
> 
>   translates to the PowerBASIC code
>      for i = 1 to %SIZE
>         flags(i) = %ON
>      next
> 
>   Because this obviously is slow, I made another version of the BASIC
>   program, where I replaced this code by an asm routine, using 'rep
>   stosw'. The resulting program is labeled 'PB+asm' in the following
>   table. Interpreted Eu is also much faster than this "patched" program.
> 
> 
> I got the following results (Pentium II 400 MHz processor, Win 98),
> using the command-line parameter 90000, as described in
> "Euphoria\demo\bench\":
> 
> 
> plain DOS
> -.-.-.-.-
>                     time measured     speed relative to ex.exe
>                     -------------     ------------------------
> PB    :             897,21 sec        3.7 times slower
> PB+asm:             687,39 sec        2.9 times slower
> ex.exe:             241,45 sec        1
> 
> 
> Windows
> -.-.-.-
>                     time measured     speed relative to exw.exe
>                     -------------     -------------------------
> PB     (DOS box):   904,57 sec        3.6 times slower
> PB+asm (DOS box):   693,43 sec        2.7 times slower
> exw.exe         :   252,89 sec        1
> 
> 
> Disclaimer:
> The latest PB/DOS version isn't 3.2, but 3.5.
> 32-bit PB/Windows generates faster programs than PB/DOS (I couldn't test
> it, because instead of buying it, I bought Euphoria. smile
> 
> PowerBASIC Inc. claims: "PowerBASIC has long been associated with
> performance". I actually think this is true, but the cool thing is,
> that interpreted Euphoria is even more then 3.5 times faster than
> compiled PowerBASIC/DOS!!
> 
> Best regards,
>    Juergen
> 
> -- 
>  /"\  ASCII ribbon campain  |    |\      _,,,---,,_
>  \ /  against HTML in       |    /,`.-'`'    -.  ;-;;,_
>   X   e-mail and news,      |   |,4-  ) )-,_..;\ (  `'-'
>  / \  and unneeded MIME     |  '---''(_/--'  `-'\_)
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 

-- 
 /"\  ASCII ribbon              | http://www.geocities.com/jbrown1050/
 \ /  campain against           | Linux User:190064
  X   HTML in e-mail and        | Linux Machine:84163
 /*\  news, and unneeded MIME   |

new topic     » goto parent     » topic index » view message » categorize

3. Re: benchmark: Eu wins again

Just for fun, I did a hand-translation of \demo\bench\sieve.ex to x86 
assembly (only regular instructions, no SIMD, and no extreme optimizations). 
Here are the results i got:

sieve.ex (executed by ex.exe): 7216.6 sieves/second
sieve.exe: 54630.3 sieves/second

So the assembly version was about 657% faster. Gosh, didn't see that 
coming..  : )

Test computer:
P-II 450MHz
384MB 100MHz SDRAM
not sure about the cahche size
Windows 2000 pro

The figures were averaged over three runs. If you want to see the code or 
try the program on your own computer you can find it here:  
http://www.cyd.liu.se/~micol972/site/asieve.zip
The source compiles with MASM (freeware), but the executable is included so 
you don't need to compile it yourself, unless you decide to make any 
changes.

new topic     » goto parent     » topic index » view message » categorize

4. Re: benchmark: Eu wins again

Hello Mic, you wrote:

> Just for fun, I did a hand-translation of \demo\bench\sieve.ex

This program ships with Eu 2.3. Was it intended, that you used this
older version? It's a bit differnt from sieve8k.exw, that comes with Eu
2.4.

> to x86 assembly (only regular instructions, no SIMD, and no extreme
> optimizations).

<snip>

Best regards,
   Juergen

-- 
 /"\  ASCII ribbon campain  |    |\      _,,,---,,_
 \ /  against HTML in       |    /,`.-'`'    -.  ;-;;,_
  X   e-mail and news,      |   |,4-  ) )-,_..;\ (  `'-'
 / \  and unneeded MIME     |  '---''(_/--'  `-'\_)

new topic     » goto parent     » topic index » view message » categorize

5. Re: benchmark: Eu wins again

On Mon, 26 May 2003 16:51:11 +0000, stabmaster_ at hotmail.com wrote:

>Just for fun, I did a hand-translation of \demo\bench\sieve.ex to x86=20
>assembly (only regular instructions, no SIMD, and no extreme =
optimizations).=20
>Here are the results i got:
>
>sieve.ex (executed by ex.exe): 7216.6 sieves/second
>sieve.exe: 54630.3 sieves/second
>
>So the assembly version was about 657% faster. Gosh, didn't see that=20
>coming..  : )

I'm very happy that assembly is *only* 7.5 times faster than eu. Add
bounds checking, syntax checking, type checking, single-step tracing
and a decent diagnostic dump should things go wrong to assembler.
Ha ha!

Pete

new topic     » goto parent     » topic index » view message » categorize

6. Re: benchmark: Eu wins again

>This program ships with Eu 2.3. Was it intended, that you used this
>older version? It's a bit differnt from sieve8k.exw, that comes with Eu
>2.4.


Since i'm still using 2.3 i guess the answer would be "yes".

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu