Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 15:52 28 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : speed tests

     Page 1 of 2    
Author Message
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 02:37pm 20 Jun 2017
Copy link to clipboard 
Print this post

could someone please run the following code on various micromites and report the times returned:

Print "Sieve of Eratosthenes Speed Test"
Start = Timer

10 W=500:Dim F(W):P=1:A=3
20 F(P)=A:P=P+1:If P>W Then GoTo DONE
30 A=A+2:X=1
40 S=A/F(X):If S=Int(S) Then 30
50 X=X+1:If X<P And F(X)*F(X)<=A Then 40
60 GoTo 20

DONE:
Print (Timer-Start)/1000


so far: MX170 @ 40MHz reports 5.31 seconds.

i'm intetested in getting the results for MX470, MZ, RPi zero, and RPi 3.


cheers,
rob :-)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9063
Posted: 04:45pm 20 Jun 2017
Copy link to clipboard 
Print this post

E100 MM+ 470 @ 100MHz = 2.958
E100 MM+ 470 @ 120MHz = 2.462



Edited by Grogster 2017-06-22
Smoke makes things work. When the smoke gets out, it stops!
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 05:42pm 20 Jun 2017
Copy link to clipboard 
Print this post

Rob,

I ran your program on a Grogster SkinnyMite board with an MX470F512H chip, version 4.6b++b16 software, CPU 40, all old stuff. The result was 7.282 (CPU 80, result 4.097)

I also ran it on an MX150F128B version 4.5 Beta 10 software, CPU 40, result 6.857
Even older stuff (I know, a 150 who cares) but I had it handy and ran it.

Lou
Edited by Lou 2017-06-22
Microcontrollers - the other white meat
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1801
Posted: 05:50pm 20 Jun 2017
Copy link to clipboard 
Print this post

E100 MM+ 470 @ 100MHz = 2.972
MMX @ 200 MHz = 1.121
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 05:51pm 20 Jun 2017
Copy link to clipboard 
Print this post

Hi Rob

PiZero (not w)



Regards
Jman
 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 202
Posted: 06:41pm 20 Jun 2017
Copy link to clipboard 
Print this post

Hi Rob

Raspberry Pi B+ v1.2: 0.666

Raspberry Pi 2B v1.2: 0.221
(running off 8GB USB Flash drive)

Raspberry Pi 3: 0.217
(running off 8GB USB Flash drive)

Of course, it varies on whether the Pi's are being over-clocked
[My Pi 2 & 3 are throttled to 1 GHz: not the fastest kids on the block!]

Rgds
don
Edited by led-bloon 2017-06-22
Miss you George
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 08:17pm 20 Jun 2017
Copy link to clipboard 
Print this post

  led-bloon said  
Raspberry Pi B+ v1.2: 0.666


do you know what clock speed the B+ is running at? i believe the default should be 700MHz from what i can see online.


cheers,
rob :-)
 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 202
Posted: 09:23pm 20 Jun 2017
Copy link to clipboard 
Print this post

Raspberry Pi B+:
1GHz arm
core freq=500MHz: sdram freq=600MHz: over volts=6: gpu mem=128
Rasbian wheezy
Edited by led-bloon 2017-06-22
Miss you George
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 09:38pm 20 Jun 2017
Copy link to clipboard 
Print this post

Pi zero W

0.63

Pi 3 Model B V1.2

0.185

MMX 252MHz

0.934
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 12:33am 21 Jun 2017
Copy link to clipboard 
Print this post

I think I have the record!

Is this cheating?



 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 12:39am 21 Jun 2017
Copy link to clipboard 
Print this post

Sorta makes the Pi 3 look pretty impressive Vs the 2.4Gig Core i7 with 16Gigs.

And a bit more than the $60.00 price tag.

Phil.
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 03:11am 21 Jun 2017
Copy link to clipboard 
Print this post

there does seem to be quite a variation in what different people are seeing on the same RPi hardware. i'm guessing this is caused by clock tweak differences, and perhaps even power quality (if a RPi detects sagging power it seems to throttle back the clock to reduce current draw).

peter: are all your RPi's running at the standard out-of-the-box clock rate? that is 1GHz for the zero, 1.2GHz for the 3.

jman: your RPi zero seems much slower than peter's RPi zero W, is it doing anything else at the same time that might be slowing it down?


btw, i'm wanting the numbers for a speed comparison chart in a magazine article. the article will be mostly about the MX170, but i'm keen to include a couple of the RPi results for speed comparisons. results for several 1980's machines will also be included.

here are the results so far plus the 'historic' figures from the net:

How Fast Were Those Late 1970s Home Computers?
8-Bit Home Computer Benchmarks

computer model clock CPU time lines/sec
============== ===== === ==== =========
TRS 80 model I with Level II Basic 1.77 MHz Z80 421 s 378
Sinclair ZX Spectrum +3 3.55 MHz Z80A 388 s 411
Tandy 102 2.40 MHz 80C85 367 s 434
Atari 130XE (Atari BASIC Rev. C) 1.79 MHz 6502C 338 s 471
Atari 800XL 1.80 MHz 6502 316 s 504
Tandy 64K CoCo 2 0.90 MHz 6809E 271 s 588
Commodore Plus/4 1.80 MHz 8501 267 s 597
Sony F1XV MSX2+ (MSX Microsoft BASIC 3.0) 3.58 MHz Z80A 260 s 613
Commodore C64 1.00 MHz 6510 254 s 627
Commodore VIC-20 (Microsoft BASIC 2a) 1.00 MHz 6502 234 s 681
TRS-80 Micro Colour Computer (MC-10) 0.90 MHz 6803 220 s 724
Apple IIe Enhanced (Applesoft II) 1.00 MHz 6502 211 s 755
Sharp MZ-731 4.00 MHz Z80A 182 s 875
Commodore 128 2.00 MHz 8502 152 s 1048
Tandy 64K CoCo 3 1.79 MHz 809E 147 s 1084
Amstrad CPC464 4.00 MHz Z80A 140 s 1138
Acorn Electron 2.00 MHz 6502 138 s 1154
BBC Model B (BBC BASIC 2) 2.00 MHz 6502 101 s 1577
BBC Master (BBC BASIC 4) 2.00 MHz 65SC12 76 s 2096

Micromite MX150 40 MHz mips M4K 6.86 s 23232
Micromite MX170 (Mk II) 40 MHz mips M4K 5.31 s 30000
Micromite MX470 (plus) 100 MHz mips M4K 2.96 s 53854
Micromite MZ2048 (extreme) 200 MHz mips M 1.12 s 142105
MMbasic on RPi Zero (JG) ARMv6 0.89 s 178387
MMbasic on RPi B+ (DH) ARMv6 0.67 s 239189
MMbasic on RPi Zero W (PM) ARMv6 0.63 s 252857
MMbasic on RPi 3 (DH) ARMv8 0.22 s 734101
MMbasic on RPi 3 (PM) ARMv8 0.19 s 861081
MMbasic for WIN32 2400 MHz i7 0.06 s 2569355



cheers,
rob :-)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 03:20am 21 Jun 2017
Copy link to clipboard 
Print this post

  Quote  peter: are all your RPi's running at the standard out-of-the-box clock rate? that is 1GHz for the zero, 1.2GHz for the 3.


Yes

Note that my Pi zero is a "W" jman's isn't - don't know if this makes a difference. I'm running Raspbian Jessie Lite on the W (no GUI). - full Raspbian Jessie on the Pi 3
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 11:06am 21 Jun 2017
Copy link to clipboard 
Print this post

I am a bit surprised at the '170 time, it should be faster I think.
I copied a sieve-of-eratosthenes [from a page of Peter M. Maurer], bodged
it a bit to match my f77 interpreter, on a '170 at 50MHz it takes about half a second, including printing the list of 95 numbers.
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 03:04pm 21 Jun 2017
Copy link to clipboard 
Print this post

Hi Rob,

Just couldn't resist trying it....

Had to power up my old AMD Athlon 1200 that's been parked under the front bench.
Think it's been retired for around 11 years.


0.251 is the best I see.

Put's it in amongst the rPi's.
DOS MMbasic 4.5 of course.

Cheers

Phil.
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 04:26am 24 Jun 2017
Copy link to clipboard 
Print this post

  chronic said   I am a bit surprised at the '170 time, it should be faster I think.
I copied a sieve-of-eratosthenes [from a page of Peter M. Maurer], bodged
it a bit to match my f77 interpreter, on a '170 at 50MHz it takes about half a second, including printing the list of 95 numbers.

Just outta curiosity: which "list of 95 numbers"?

Printing a list of 500 numbers takes on my MM2 (48 Mhz, MMBasic 5.1, 38400 Baud ) 0.6s.
Start = Timer
For i = 1 To w:Print f(i);:Next
Print (Timer-Start)/1000

At 115200 Baud takes it 0.2s.

This code
  Quote  CPU 48
Print "Sieve of Eratosthenes Speed Test"
Start = Timer
10 W=500:Dim F(W):P=1:A=3
20 F(P)=A:P=P+1:If P>W Then GoTo DONE
30 A=A+2:X=1
40 S=A/F(X):If S=Int(S) Then 30
50 X=X+1:If X<P And F(X)^2<=A Then 40
60 GoTo 20

DONE:
Print (Timer-Start)/1000

takes 3.8s.

MichaelEdited by twofingers 2017-06-25
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 01:15pm 24 Jun 2017
Copy link to clipboard 
Print this post

the below provides a more complete set of results, including counting the number of statements and lines. the core bit of code is exactly the same as posted on the net here:
http://www.retroprogramming.com/2010/01/8-bit-home-computer-benchmarks.html


cheers,
rob :-)


Print "Sieve of Eratosthenes Speed Test"
Print
Start = Timer

10 W=500:Dim F(W):P=1:A=3
20 F(P)=A:P=P+1:If P>W Then GoTo DONE
30 A=A+2:X=1
40 S=A/F(X):If S=Int(S) Then 30
50 X=X+1:If X<P And F(X)*F(X)<=A Then 40
60 GoTo 20

DONE:
Elapsed = (Timer-Start)/1000
Print Elapsed " seconds"
Print

I = 0 ' statement counter
J = 0 ' line counter
Erase F

110 I=I+4: J=J+1: W=500:Dim F(W):P=1:A=3
120 I=I+3: J=J+1: F(P)=A:P=P+1:If P>W Then GoTo FINI
130 I=I+2: J=J+1: A=A+2:X=1
Print ,P Chr$(13);
140 I=I+2: J=J+1: S=A/F(X):If S=Int(S) Then I=I+1: GoTo 130
150 I=I+2: J=J+1: X=X+1:If X<P And F(X)*F(X)<=A Then I=I+1: GoTo 140
160 I=I+1: J=J+1: GoTo 120

FINI:
Print I " statements"
Print J " lines"
Print
Print I / Elapsed " statements per second"
Print J / Elapsed " lines per second"
Print

>
>
> run
Sieve of Eratosthenes Speed Test

5.403 seconds

48122 statements
19747 lines

8906.53 statements per second
3654.82 lines per second

Edited by robert.rozee 2017-06-25
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 05:51pm 24 Jun 2017
Copy link to clipboard 
Print this post

I guessed it produces the prime numbers under 500 ?
(or is it the first 500 prime numbers ?- I probably made a mistake )
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 06:42pm 24 Jun 2017
Copy link to clipboard 
Print this post

Anything that contains a PRINT statement is not measuring the speed of the processor but the speed of the output device.

Microblocks. Build with logic.
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 06:51pm 24 Jun 2017
Copy link to clipboard 
Print this post

  chronic said   ... I probably made a mistake )

You did!

Best regards
Michael

 
     Page 1 of 2    
Print this page
© JAQ Software 2024