Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:07 24 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 : [PicoMite] New benchmark program

Author Message
ice2642

Regular Member

Joined: 27/05/2023
Location: Brazil
Posts: 82
Posted: 04:49pm 16 Jul 2023
Copy link to clipboard 
Print this post

Hello,

Some time a go, the user Martin H. post a fractal code in other topic, and I use it, change a lite to make this benchmark program.

All files are is in this zip attached.
fracbench.zip

For the people that not want get zip  

'MMBASIC (PicoMiteVGA) translated from Qbasic Source:
'https://rosettacode.org/wiki/Julia_set#QBasic

'Edited by Marcio Esper for a simple benchmark program
'And comments about the run flow
'Sorry about my English

CLS ' cleam screem
MODE 2 ' change video mode to 320 x 240 4bit
Load image "bg.bmp" ,0,0 ' load back grownd
Print @(20, 70) " " ' position cursor
Print "CPU Clock = "; 'show informations
Print Val(MM.Info(CPUSPEED))/1000000; ' about CPU
Print " MHz" ' in Mhz
Print :Print " BenchMark test " ' more bla bla bla
Print :Print " This program can get a long time." ' etc..
Print "Press <Enter> to start.";: Input a$ ' wait enter in a input
Timer =0 ' start the timer
For varrer = 1 To 50:Print :Pause 10 :Next ' cleem screen

escala = 0.6 / 81:zeroX = 160:zeroY = 120 'scale and position view
maxiter = 19  ' complexity
CR = -.798    ' padrom (make the design, change for others results
CI = .1918    ' padrom

Dim integer CL(15) ' Array to the colors

FRAMEBUFFER create  '----------------------------.
stage:              ' Not needed in this program '
FRAMEBUFFER write l '----------------------------'

Restore COLORS:For y=1 To 15:Read CL(y):Next 'Colours data get

 For x = 0 To 2 * zeroX - .8 ' draw, step 2 cam make fast but grid
    For y = 0 To 2 * zeroY - .8 ' same
      zreal = (x - zeroX) * escala ' algoritim fro draw pixels position
      zimag = (zeroY - y) * escala ' same
        For iter = 1 To maxiter
          BR = CR + zreal * zreal - zimag * zimag 'padrom
          zimag = CI + 2 * zreal * zimag ' Zoom in fractal
          zreal = BR
           Print @(10,10,2)" Complexity = " maxiter " score = " Timer
            FRAMEBUFFER copy l,n ' not needed in this program
              If zreal * zreal + zimag * zimag > 4 Then ' check size
              Pixel x, y, cl((iter Mod 16)) ' ajust
              Exit For 'start a new cicle
              EndIf
         Next
    Next
 Next

maxiter=maxiter*2     '---------------------------------------------'
If maxiter < 20 Then '                                               '
GoTo stage           '  Not needed in this program, for use in other '
EndIf                '                                               '
                     '---------------------------------------------'
MODE 1 'change mode to 640x480 2bit and show the results
Print :Print
Print " **************** "
Print " *    Results   * "
Print " **************** "
Print :Print
Print "  Score = " Timer
Print "  Less is best"
Print "  Time elapsed " (Timer/1000)/60
Print "  Have a good day ;)"
FRAMEBUFFER close ' not need in this program, here to mantain
                 ' compatibility with other project
End ' The end. stop all execution.

colors: ' label for go to
'--Colorscheme accordung to matherp
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)


and the image for background, you need use other or comment the load image from code if you do not want use the zip file.

This program is just for fun, if you want post your score or test in others MMBasic boards.

Here with a 372MHz CPU clock it get +- 9 minutes.

I hope you enjoy.

Best regards,

Marcio
MMBasic 5.0707 on PicoMite VGA
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 09:08am 20 Sep 2024
Copy link to clipboard 
Print this post

PICO VS PICO2 :

Pco @252000
  Quote   PicoMiteVGA MMBasic Version 6.00.00b6
OPTION COLOURCODE ON
OPTION KEYBOARD GR, 0, 0, 0, 0
OPTION CPUSPEED (KHz) 252000
OPTION SDCARD GP10, GP12, GP11, GP13
OPTION AUDIO GP6,GP7', ON PWM CHANNEL 3
OPTION MODBUFF ENABLE  180

****************
*    Results   *
****************


 Score =  2.212379459e+06
 Less is best
 Time elapsed  36.87305032
 Have a good day ;)



Pco @315000
  Quote  
****************
*    Results   *
****************


 Score =  1.690215088e+06
 Less is best
 Time elapsed  28.17029943
 Have a good day ;)

Pico @378000
  Quote  
****************
*    Results   *
****************


 Score =  1.350580381e+06
 Less is best
 Time elapsed  22.5097127
 Have a good day ;)


Pico2 @315000
  Quote  
> option list
PicoMiteHDMI MMBasic Version 6.00.00b6
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION CPUSPEED (KHz) 315000
OPTION SDCARD GP5, GP2, GP3, GP4
OPTION AUDIO GP6,GP7', ON PWM CHANNEL 3
OPTION MODBUFF ENABLE  220

****************
*    Results   *
****************

 Score =  1.449360895e+06
 Less is best
 Time elapsed  24.15605005
 Have a good day ;)



Edited 2024-09-20 20:18 by Martin H.
'no comment
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 206
Posted: 04:30pm 20 Sep 2024
Copy link to clipboard 
Print this post

  Martin H. said  PICO VS PICO2 :
Pico2 @315000
  Quote  
> option list
PicoMiteHDMI MMBasic Version 6.00.00b6
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION CPUSPEED (KHz) 315000
OPTION SDCARD GP5, GP2, GP3, GP4
OPTION AUDIO GP6,GP7', ON PWM CHANNEL 3
OPTION MODBUFF ENABLE  220

****************
*    Results   *
****************

 Score =  1.449360895e+06
 Less is best
 Time elapsed  24.15605005
 Have a good day ;)


Strangely low result for Pico 2
here are my results of this test
PicoMiteVGA MMBasic Version 6.00.00b5
Pico2 @252000

****************
*    Results   *
****************

 Score =  521306.313
 Less is best
 Time elapsed  8.68845525
 Have a good day ;)
 
Print this page


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

© JAQ Software 2024