Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:46 27 Nov 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 : CMM2: Benchmarking against other new-retro computers

Author Message
PeteCotton

Guru

Joined: 13/08/2020
Location: Canada
Posts: 368
Posted: 03:31pm 08 Dec 2023
Copy link to clipboard 
Print this post

Well, I am a silly sausage. I've been looking at the how the CMM2 stacks up to the current competition. The Agon Light makes a big deal as to how fast it's basic is, and they publish a table on their website showing it compared to other computers using Matt Heffernan's Mandelbrot benchmark.



So, I thought this would be an easy win, and punched the benchmark into my CMM2 - but try as I might, I couldn't get it running as fast as the Agon.... or so I thought. The CMM2 consistently runs the program in 136 milliseconds, how on earth was the Agon posting 70 millisecond times?

Ah - this is where my stupidity comes in - that doesn't say 0.07 seconds - it says 0:07 seconds - i.e. it takes the Agon 7 seconds to draw the test.

All is right with the world again.

Even in Assembler, the Agon takes 0.7 seconds - see video below. So, the CMM2 BASIC is 5 times faster than the Agon Assembled version.

https://www.youtube.com/watch?v=UxLk_X8VIK8

*This post is not meant to knock the Agon - it's an 8 bit machine running against a 480MHz ARM - and I think they've done a wonderful job with it. But if we are to put the CMM2 out there as one of the major front runners in the new retro scene - and a machine where you can program the game of your dreams without needing to drop into machine code - then we need to be able to prove that it's as fast as we say it is.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4238
Posted: 03:55pm 08 Dec 2023
Copy link to clipboard 
Print this post

Picomite VGA: 700ms in a non optimized stupid line number version

10 mode 2
20 DIM COL(15)
30 for I=0 to 14:READ COL(I):NEXT I
40 timer=0
100 FOR PY=0 TO 21
110 FOR PX=0 TO 31
120 XZ = PX*3.5/32-2.5
130 YZ = PY*2/22-1
140 X = 0
150 Y = 0
160 FOR I=0 TO 14
170 IF X*X+Y*Y > 4 THEN GOTO 215
180 XT = X*X - Y*Y + XZ
190 Y = 2*X*Y + YZ
200 X = XT
210 NEXT I
215 IF I = 15 THEN I = 0
230 box PX*8,PY*8,8,8,1,COL(I),COL(I)
240 NEXT PX
260 NEXT PY
280 print timer
300 Data RGB(BLUE),RGB(GREEN),RGB(CYAN),RGB(RED)
310 Data RGB(MAGENTA),RGB(YELLOW),RGB(WHITE),RGB(MYRTLE)
320 Data RGB(COBALT) ,RGB(MIDGREEN),RGB(CERULEAN),RGB(RUST)
330 Data RGB(FUCHSIA),RGB(BROWN),RGB(LILAC)


As fast as Aegon in assembly...

Volhout
PicomiteVGA PETSCII ROBOTS
 
PeteCotton

Guru

Joined: 13/08/2020
Location: Canada
Posts: 368
Posted: 04:02pm 08 Dec 2023
Copy link to clipboard 
Print this post

  Volhout said  Picomite VGA: 700ms in a non optimized stupid line number version
As fast as Aegon in assembly...

Volhout


Nice. I also noticed that in the Agon code, they moved line 130 up two lines so it's between the FOR loops - which make it run even faster.
10 mode 2
100 FOR PY=0 TO 21
110 FOR PX=0 TO 31
120 XZ = PX*3.5/32-2.5
130 YZ = PY*2/22-1


10 mode 2
100 FOR PY=0 TO 21
105 YZ = PY*2/22-1
110 FOR PX=0 TO 31
120 XZ = PX*3.5/32-2.5

Edited 2023-12-09 02:03 by PeteCotton
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9120
Posted: 05:25pm 08 Dec 2023
Copy link to clipboard 
Print this post

579mSec on a PicoMiteVGA at 252MHz with a couple of tweaks

option explicit
Dim integer py,px,i
Dim float x,y,xz,yz,xt
MODE 2
Dim integer COL(16)
For I=0 To 15:Read COL(I):Next I
Timer =0
For PY=0 To 168 Step 8
YZ=PY/88-1
For PX=0 To 248 Step 8
XZ=PX/73.14-2.5:X=0:Y=0
For I=0 To 14
If X*X+y*y>4 Then Exit For
XT=X*x-Y*y+XZ:Y=2*X*Y+YZ:X=XT
Next
Box PX,PY,8,8,0,0,COL(I)
Next
Next
Print Timer
Data RGB(BLUE),RGB(GREEN),RGB(CYAN),RGB(RED)
Data RGB(MAGENTA),RGB(YELLOW),RGB(WHITE),RGB(MYRTLE)
Data RGB(COBALT) ,RGB(MIDGREEN),RGB(CERULEAN),RGB(RUST)
Data RGB(FUCHSIA),RGB(BROWN),RGB(LILAC),RGB(BLUE)

Edited 2023-12-09 03:26 by matherp
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 06:12pm 08 Dec 2023
Copy link to clipboard 
Print this post

  Volhout said  Picomite VGA: 700ms in a non optimized stupid line number version
As fast as Aegon in assembly...

Volhout

 yes, I remember, I think that was my introduction to the forum here :-)
Even with VT100 it was still faster than the 8 Bitter in Assembler.

The bottleneck here was the serial transmission and the additional esc sequences.
non optimized
'mandelbrot

'inspired by Matt Heffernan s 8-BIT BATTLE
'https://www.youtube.com/watch?v=DC5wi6iv9io
'for PicoMite is a Raspberry Pi Pico running the free MMBasic interpreter.
'and Putty or other VT100 emulation
'2022 by M. Herhaus
'clrear screen, home and cursor off
Print Chr$(27);"[2J";Chr$(27);"[H";Chr$(27);"[?25l";
' max x and max y
t=Timer
DX=80:DY=30
For py=0 To DY-1
yz=py*2/DY-1
 For px=0 To DX-1
   xz=px*3.5/DX-2.5

   x=0
   y=0
   For i=0 To 7
     If x*x+y*y>4 Then Exit For
     xt = x*x - y*y + xz
     y= 2 * x * y + yz
     x=xt
   Next i
   Print Chr$(27);"[";Str$(py+1);"H";Chr$(27);"[";Str$(px+1);"G";
   'at py+1,px+1
   Print Chr$(27);"[";Str$(39+i);"m ";
 Next px
Next py
Print Chr$(27);"[40m";Chr$(27);"[?25h"
Print Timer-t

PicoMite at 252MHz 3,3 sek
0,896 when setting dx to 31 and dy to 21 (like in the original challange
Edited 2023-12-09 04:21 by Martin H.
'no comment
 
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 205
Posted: 06:09am 09 Dec 2023
Copy link to clipboard 
Print this post

Last year I posted a short program that drew Archimedes Spiral on the VGA PicoMite. It’s a short program, but it required nearly 3 hours to complete on an Atari 800, but the PicoMite only needed 7-14 seconds.
https://www.thebackshed.com/forum/ViewTopic.php?TID=14777&PID=185449#185449
 
PeteCotton

Guru

Joined: 13/08/2020
Location: Canada
Posts: 368
Posted: 05:02pm 09 Dec 2023
Copy link to clipboard 
Print this post

  al18 said  Last year I posted a short program that drew Archimedes Spiral on the VGA PicoMite. It’s a short program, but it required nearly 3 hours to complete on an Atari 800, but the PicoMite only needed 7-14 seconds.
https://www.thebackshed.com/forum/ViewTopic.php?TID=14777&PID=185449#185449


Very cool. I just tried it on the CMM2 and it runs (with a couple if minor tweaks) just under 1.4 seconds. There's life in the old dog yet!
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 06:29pm 09 Dec 2023
Copy link to clipboard 
Print this post

  PeteCotton said  
  al18 said  Last year I posted a short program that drew Archimedes Spiral on the VGA PicoMite. It’s a short program, but it required nearly 3 hours to complete on an Atari 800, but the PicoMite only needed 7-14 seconds.
https://www.thebackshed.com/forum/ViewTopic.php?TID=14777&PID=185449#185449


Very cool. I just tried it on the CMM2 and it runs (with a couple if minor tweaks) just under 1.4 seconds. There's life in the old dog yet!


I went back to al18's link and used VegiPete's version. Using 5.08.00b4, with all the enhancements to MMBasic, and running at CPUSPEED 378000, that 7-14 seconds dropped to 1.8 seconds for the ILI9341, and 6.6 seconds for the ILI9488.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024