Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:03 25 Apr 2026 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 : Stop Press: PicoMite @ 378MHz faster than 480MHz CMM2

Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11232
Posted: 11:44am 24 Apr 2026
Copy link to clipboard 
Print this post



Option tracecache on 128
'
Pause 1000
Print "Micromite Benchmark tests"
Print " "

Print "Benchmark 1"
Timer = 0
For j = 1 To 10000
Next j
Print Timer / 10000
Print " "

Print "Benchmark 2"
Timer = 0
j =0
BM2:
j = j+1
If j < 10000 GoTo BM2
j=Timer
Print j / 10000
Print " "

Print "Benchmark 3"
Timer = 0
j = 0
BM3:
j = j+1
a = j/j*j+j-j
If j < 10000 GoTo BM3
j=Timer
Print j / 10000
Print " "

Print "Benchmark 4"
Timer = 0
j = 0
BM4:
j = j+1
a = j/2*3+4-5
If j < 10000 GoTo BM4
j=Timer
Print j / 10000
Print " "

Print "Benchmark 5"
Timer = 0
j = 0
BM5:
j = j+1
m = j/2*3+4-5
GoSub 4000
If j < 10000 GoTo BM5
j=Timer
Print j / 10000
Print " "

Print "Benchmark 6"
Timer = 0
j = 0
Dim rayx(5)
BM6:
j = j+1
m = j/2*3+4-5
GoSub 4000
For q = 1 To 5
Next q
If j < 10000 GoTo BM6
j=Timer
Print j / 10000
Print " "

Print "Benchmark 7"
Timer = 0
j = 0
Dim ray2(5)
BM7:
j = j+1
m = j/2*3+4-5
GoSub 4000
For q = 1 To 5
ray2(q) = m
Next q
If j < 10000 GoTo BM7
j=Timer
Print j / 10000
Print " "

Print "Benchmark 8"
Timer = 0
j = 0
BM8:
j = j+1
m = j^2
blog = Log(j)
csin = Sin(j)
If j < 10000 GoTo BM8
j=Timer
Print j / 10000
Do
Loop While Inkey$=""
End

4000 Return


Here is the result with the PicoMite without the bytecode optimiser
  Quote  Benchmark 1
0.0022644

Benchmark 2
0.0180988

Benchmark 3
0.0288411

Benchmark 4
0.0262077

Benchmark 5
0.0738827

Benchmark 6
0.0926415

Benchmark 7
0.126989

Benchmark 8
0.0377242
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1854
Posted: 01:12pm 24 Apr 2026
Copy link to clipboard 
Print this post

It's about time 🤣😂

(I'll see myself out)


Not to mention that we can link two devices with memory share 👍😎👍
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 792
Posted: 01:27pm 24 Apr 2026
Copy link to clipboard 
Print this post

yes it's remarkably fast now :-) I'm attempting to modify a Basic Mandelbrot plotter to divide & plot in ever decreasing squares, such that when all the edges of a square are the same colour, the rest of the square can be filled that colour, or there is nothing left to subdivide. Unfortunately it's looking like the extra processing will eliminate any gains, definitely won't be as fast as your Easter Egg :-(
My Starfeild program is almost double speed with the most recent update. :-)
Regards Kevin.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11232
Posted: 02:16pm 24 Apr 2026
Copy link to clipboard 
Print this post

  Quote  My Starfeild program is almost double speed with the most recent update

53 mSec with B1 just posted (HDMIUSB @ 378MHz)
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 792
Posted: 03:08pm 24 Apr 2026
Copy link to clipboard 
Print this post

Ok, I'd missed that, I'll go and find the latest & give them a spin on some of my units. :-)
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 792
Posted: 05:01pm 24 Apr 2026
Copy link to clipboard 
Print this post

Hi Peter,
I couldn't get my copy of Starfield down to 53mS, it was hovering around 58mS. So on a whim, I removed a block of 10 lines of commented out code, the section I had changed from a Case block to a If, ElseIf and the code suddenly ran at 50mS, so I tried putting back 5 of those commented out lines and it went back up to about 53mS, about half?
That seems like quite a hit for commented out code? it is in the most critical path.
My copy attached so we're looking at the same thing.
Regards Kevin.
'Starfield by Juri Fossaroli
'PicomiteVGA version Martin Herhaus
'set mode here if appropriate
'Option Profiling On
Option TraceCache On 20
'Option Cache Debug On
MODE 3
'change maxst for more or fewer stars
Dim Integer maxst=1250,h=MM.VRES,w=MM.HRES,x,y,st,c
Dim Float f,stx(maxst),stxx(maxst),sty(maxst),styy(maxst),stz(maxst)
Dim Integer ox(maxst),oy(maxst),oxl(maxst),oyl(maxst),cl(maxst),s(maxst)
'FRAMEBUFFER create
'FRAMEBUFFER write f
CLS
'initialise the stars
For st=0 To maxst
 stxx(st)=(Rnd*w>>1)-(w>>2):styy(st)=(Rnd*h>>1)-(h>>2)
 stz(st)=Int(Rnd*5+5)/10
 cl(st)=RGB(White)
Next
'initialise array for box size
Math Set 2,s()

Do
'move stars forward
Math Add stz(),-0.025,stz()
'do the calculation (stx/stz)+half width
Math C_div stxx(),stz(),stx():Math Add stx(),w>>1,stx()
'do the calculation (sty/stz)+half height
Math C_div styy(),stz(),sty():Math Add sty(),h>>1,sty()
'reset rouge stars
'Inc c:c=c*(c<=maxst)
Inc c:If c>maxst Then c=0
'stx(c)=stx(c)*(stz(c)>0.1)
If stz(c)<0 Then stx(c)=0
'loop for all stars
'set star colour and check for star off screen
For st=0 To maxst
x=stx(st):y=sty(st)
' Select Case stz(st)
' Case < 0.2
'  cl(st)=&HFFFF00'RGB(Yellow)
' Case < 0.6
'  cl(st)=&HFFFFFF'RGB(White)
' Case < 0.8
'  cl(st)=&HFFFF'RGB(Cyan)
' Case Else
'  cl(st)=&HFF'RGB(Blue)
' End Select
If stz(st) < 0.2 Then
 cl(st)=&HFFFF00'RGB(Yellow)
ElseIf stz(st) < 0.6 Then
 cl(st)=&HFFFFFF'RGB(White)
ElseIf stz(st) < 0.8 Then
 cl(st)=&HFFFF'RGB(Cyan)
Else 'If stz(st) >= 0.8 Then
 cl(st)=&HFF'RGB(Blue)
EndIf

If (x>0 And x<w And y>0 And y<h)Then
 ox(st)=x:oy(st)=y
Else
 Inc f,0.025:If f>0.09 Then f=0
 stxx(st)=(Rnd*w>>1)-(w>>2)
 styy(st)=(Rnd*h>>1)-(h>>2)
 stz(st)=Int(Rnd*5+5)/10+f
EndIf
Next
'blank out last times stars, replace with new stars
Pixel oxl(),oyl(),0:Pixel ox(),oy(),cl()
' Box oxl(),oyl(),s(),s(),0,,0:Box ox(),oy(),s(),s(),0,,cl()
'copy this times stars, to last times stars array
Math Add ox(),0,oxl():Math add oy(),0,oyl()
' FRAMEBUFFER copy f,n,b
Print Timer:Timer =0
Loop Until Inkey$ <> ""
End

Edited 2026-04-25 03:06 by Bleep
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8774
Posted: 05:09pm 24 Apr 2026
Copy link to clipboard 
Print this post

I'm pretty sure Raspberry Pi had no real idea about what the RP2040 and RP2350 are really capable of when they designed them. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11232
Posted: 05:50pm 24 Apr 2026
Copy link to clipboard 
Print this post

  Quote  That seems like quite a hit for commented out code? it is in the most critical path.

It's an interpreter, It has to read the fact it is a comment, then scan for the next newline and repeat. All takes time and affects the caching. For maximum speed, AUTOSAVE C
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5860
Posted: 06:40pm 24 Apr 2026
Copy link to clipboard 
Print this post

Peter,

The first post shows cmm2 and non optimized pico results. What are pico optimized results.

Volhout
PicomiteVGA PETSCII ROBOTS
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2966
Posted: 08:30pm 24 Apr 2026
Copy link to clipboard 
Print this post

  Volhout said  Peter,

The first post shows cmm2 and non optimized pico results. What are pico optimized results.

Volhout


Right hand screenshot is the optimised timings (as I read it!)
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026