Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:42 03 Jul 2020 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 : BASIC Speed Benchmark Tests

     Page 2 of 3    
Author Message
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 01:21am 17 Feb 2015
Copy link to clipboard 
Print this post

And when using cfunctions.:) (Probably need an extra decimal place.)
Edited by TZAdvantage 2015-02-18
Microblocks. Build with logic.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 3387
Posted: 12:59am 22 Feb 2015
Copy link to clipboard 
Print this post

Results for benchmark on 168MHz STM32F407VG running MMBasic

BM1 0.011
BM2 0.075
BM3 0.119
BM4 0.128
BM5 0.211
BM6 0.32
BM7 0.505
BM8 0.165
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 05:00am 25 Feb 2015
Copy link to clipboard 
Print this post

Well , i just try this benchmark on stm32f429 ...


BM1 BM2 BM3 BM4 BM5 BM6 BM7 BM8
ABC 800 single precision 0.9 1.8 6.0 5.9 6.3 11.6 19.6 2.9
ABC 800 double precision 1.2 2.2 10.0 10.6 11.0 17.8 26.4 14.4
IBM PC 1.5 5.2 12.1 12.6 13.6 23.5 37.4 3.5
Apple III 1.7 7.2 13.5 14.5 16.0 27.0 42.5 7.5
VIC-20 1.4 8.3 15.5 17.1 18.3 27.2 42.7 9.9
ZX81 in "fast mode" 4.5 6.9 16.4 15.8 18.6 49.7 68.5 22.9

Maximite 0.016 0.144 0.196 0.205 0.354 0.512 0.721 0.310

Maximite with line Nos 0.016 0.131 0.193 0.194 0.245 0.393 0.582 0.241
Maximite without line Nos 0.016 0.111 0.173 0.173 0.192 0.336 0.525 0.220
MicroMite 40MHz 0.028 0.18 0.285 0.289 0.644 0.892 1.346 0.376
MicroMite 48MHz 0.023 0.15 0.237 0.24 0.536 0.744 1.121 0.313

C-Language (code see above):
Arduino UNO 0.010 0.010 0.058 0.043 0.043 0.043 0.045 0.284
Arduino DUE 0.003 0.003 0.006 0.007 0.007 0.007 0.106 0.014

stm32f429 bm1 0.000 022
"C-Language" bm2 0.000 022
bm3 0.000 050
bm4 0.000 022
bm5 0.000 023
bm6 0.000 089
bm7 0.000 334
bm8 0.001 188


So , it appear that the chip is very fast Edited by darthmite 2015-02-26
Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2781
Posted: 07:16am 25 Feb 2015
Copy link to clipboard 
Print this post

Wow impressive stuff- are you 100% sure of these figures Fabrice?

Also can you let me know how much current the basic circuit pulls when achieving these times!

Thanks
WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 2016
Posted: 07:32am 25 Feb 2015
Copy link to clipboard 
Print this post

The C compiler may have optimised some or almost all of the code away.

Maybe worth posting the C? Someone may try RPi, A20, etc...

John
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 12:49pm 25 Feb 2015
Copy link to clipboard 
Print this post

  WhiteWizzard said   Wow impressive stuff- are you 100% sure of these figures Fabrice?

Also can you let me know how much current the basic circuit pulls when achieving these times!

Thanks
WW


for the 100% sure ... look at the picture



Now how much current it draw ... no clue ... here i have a TFT , Wii joystick , sd card , ps2 keyboard + mouse connected ...

for the sin , cos function i use the FPU , it ... help ...

Cheers.

Edited by darthmite 2015-02-26
Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 06:50am 03 Mar 2015
Copy link to clipboard 
Print this post

Hi , i just compiled for st429 with the matherp last code (little change).
Here just the frequency adjusted and put it on a st429 disco board.


BM1 BM2 BM3 BM4 BM5 BM6 BM7 BM8
ABC 800 single precision 0.9 1.8 6.0 5.9 6.3 11.6 19.6 2.9
ABC 800 double precision 1.2 2.2 10.0 10.6 11.0 17.8 26.4 14.4
IBM PC 1.5 5.2 12.1 12.6 13.6 23.5 37.4 3.5
Apple III 1.7 7.2 13.5 14.5 16.0 27.0 42.5 7.5
VIC-20 1.4 8.3 15.5 17.1 18.3 27.2 42.7 9.9
ZX81 in "fast mode" 4.5 6.9 16.4 15.8 18.6 49.7 68.5 22.9

Maximite 0.016 0.144 0.196 0.205 0.354 0.512 0.721 0.310

Maximite with line Nos 0.016 0.131 0.193 0.194 0.245 0.393 0.582 0.241
Maximite without line Nos 0.016 0.111 0.173 0.173 0.192 0.336 0.525 0.220
MicroMite 40MHz 0.028 0.18 0.285 0.289 0.644 0.892 1.346 0.376
MicroMite 48MHz 0.023 0.15 0.237 0.24 0.536 0.744 1.121 0.313

st429 180Mhz 0.012 0.073 0.117 0.125 0.207 0.315 0.497 0.162


Now , why is it not faster ? ... he he ...
The FPU is not active , no sdram , dma2d ... nothing , just like the st407 for this
test

Cheers.
Edited by darthmite 2015-03-04
Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 3387
Posted: 08:50am 14 Mar 2015
Copy link to clipboard 
Print this post

Just done a bit of performance tweaking on the 168MHz STM32F407

New times added below


BM1 BM2 BM3 BM4 BM5 BM6 BM7 BM8
ABC 800 single precision 0.9 1.8 6.0 5.9 6.3 11.6 19.6 2.9
ABC 800 double precision 1.2 2.2 10.0 10.6 11.0 17.8 26.4 14.4
IBM PC 1.5 5.2 12.1 12.6 13.6 23.5 37.4 3.5
Apple III 1.7 7.2 13.5 14.5 16.0 27.0 42.5 7.5
VIC-20 1.4 8.3 15.5 17.1 18.3 27.2 42.7 9.9
ZX81 in "fast mode" 4.5 6.9 16.4 15.8 18.6 49.7 68.5 22.9

Maximite 0.016 0.144 0.196 0.205 0.354 0.512 0.721 0.310

Maximite with line Nos 0.016 0.131 0.193 0.194 0.245 0.393 0.582 0.241
Maximite without line Nos 0.016 0.111 0.173 0.173 0.192 0.336 0.525 0.220
MicroMite 40MHz 0.028 0.18 0.285 0.289 0.644 0.892 1.346 0.376
MicroMite 48MHz 0.023 0.15 0.237 0.24 0.536 0.744 1.121 0.313

st429 180Mhz 0.012 0.073 0.117 0.125 0.207 0.315 0.497 0.162

st407 168Mhz 0.010 0.067 0.104 0.111 0.195 0.290 0.443 0.146
Edited by matherp 2015-03-15
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 930
Posted: 09:26am 14 Mar 2015
Copy link to clipboard 
Print this post

I notice that one of the benchmarks above is with line numbers. If the Micromite MMBasic still has line numbers then, surely, it is about time to drop them. We have been far less pragmatic about maintaining other features and compatibility. Line numbers are inefficient, lead to very poor coding practices, and "hard to follow" code. Space seems to be always at a premium in the flash. If they still exist then this may be a way get gain a bit of space.

Thoughts anyone?
 
Grogster

Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 7195
Posted: 02:07pm 14 Mar 2015
Copy link to clipboard 
Print this post

As a previous user of line-numbers in a big way, let me say that I agree with Bob on this one. I have not really used line-numbers for quite a while now, and no line-numbers is actually easier to program in then with line-numbers, IMHO.

Once you get the hang of structured programming and labels, line-numbers become un-necessary.

Again - MHO only.

But this vote to drop line-numbers is coming from someone who wrote all his code with line-numbers for years, but now I don't, and I can see the advantages now, whereas before, I would not consider a language that did NOT have line-numbers.

...oh, how I was led astray...
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3401
Posted: 11:48am 15 Mar 2015
Copy link to clipboard 
Print this post

There are a lot of old (but good) programs with line numbers available for translation to MMBasic.
Having line numbers might help the cause.

In MMEdit I intend to keep the routines for removing line numbers to help the updating.

The routine for adding line numbers has not kept up with the changes to MM Basic and going in that direction is less likely to be successful.

Having the benchmarks that prove that no line numbers is faster will help persuade a few.

Jim
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
 
geraldfryjr

Regular Member

Joined: 02/03/2014
Location: United States
Posts: 61
Posted: 12:28pm 15 Mar 2015
Copy link to clipboard 
Print this post

It is great to see the ARMmite added to the list of Benchmark tests!!! :D

jer :)
Keep on DIYin' !!!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 2657
Posted: 08:42pm 16 Mar 2015
Copy link to clipboard 
Print this post

Out of interest I tried the PIC32MX470 running at 120MHz:


BM1 BM2 BM3 BM4 BM5 BM6 BM7 BM8
ABC 800 single precision 0.9 1.8 6.0 5.9 6.3 11.6 19.6 2.9
ABC 800 double precision 1.2 2.2 10.0 10.6 11.0 17.8 26.4 14.4
IBM PC 1.5 5.2 12.1 12.6 13.6 23.5 37.4 3.5
Apple III 1.7 7.2 13.5 14.5 16.0 27.0 42.5 7.5
VIC-20 1.4 8.3 15.5 17.1 18.3 27.2 42.7 9.9
ZX81 in "fast mode" 4.5 6.9 16.4 15.8 18.6 49.7 68.5 22.9

Maximite 0.016 0.144 0.196 0.205 0.354 0.512 0.721 0.310

Maximite with line Nos 0.016 0.131 0.193 0.194 0.245 0.393 0.582 0.241
Maximite without line Nos 0.016 0.111 0.173 0.173 0.192 0.336 0.525 0.220
MicroMite 40MHz 0.028 0.18 0.285 0.289 0.644 0.892 1.346 0.376
MicroMite 48MHz 0.023 0.15 0.237 0.24 0.536 0.744 1.121 0.313

st429 180Mhz 0.012 0.073 0.117 0.125 0.207 0.315 0.497 0.162
st407 168Mhz 0.010 0.067 0.104 0.111 0.195 0.290 0.443 0.146

MX470 120MHz MMBasic 0.013 0.082 0.135 0.135 0.265 0.380 0.597 0.174


The MX470 MMBasic is an internal version of mine that is different from matherp's port (it runs at 120MHz for a start). It is interesting to note that the performance of the high speed processors like the MX470 and STM32F407 does not scale directly with the clock speed. This is because the CPU is more limited by the speed at which it can read the flash memory rather than its clock speed.

Benchmarks BM3 and above depend heavily on floating point calculations and you would have expected the STM32F407 with a floating point processor to be MUCH faster than the MX470 but the difference is not that great. It must be because the overhead of the interpreter is the dominating factor rather than the speed of calculating numbers.

Just why the BM5 benchmark running on a 80MHz "Maximite without line Nos" processor is faster than an ARM chip running at 180MHz is a mystery. As they say... "lies, damn lies and benchmarks".

Geoff
Geoff Graham - http://geoffg.net
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 251
Posted: 01:55pm 17 Mar 2015
Copy link to clipboard 
Print this post

Very interesting, Geoff.
I'm spending way too much time playing with different variants of the 'mite that I'm not getting any projects done.

(... actually, nothing new there...)




For crying out loud, all I wanted to do was flash this blasted LED.
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 06:06am 14 Aug 2015
Copy link to clipboard 
Print this post

Hi ,

As primary test of MMBasic on the STM32F7 discovery board i have want see if it was fast enough.


BM1 BM2 BM3 BM4 BM5 BM6 BM7 BM8
ABC 800 single precision 0.9 1.8 6.0 5.9 6.3 11.6 19.6 2.9
ABC 800 double precision 1.2 2.2 10.0 10.6 11.0 17.8 26.4 14.4
IBM PC 1.5 5.2 12.1 12.6 13.6 23.5 37.4 3.5
Apple III 1.7 7.2 13.5 14.5 16.0 27.0 42.5 7.5
VIC-20 1.4 8.3 15.5 17.1 18.3 27.2 42.7 9.9
ZX81 in "fast mode" 4.5 6.9 16.4 15.8 18.6 49.7 68.5 22.9

Maximite 0.016 0.144 0.196 0.205 0.354 0.512 0.721 0.310

Maximite with line Nos 0.016 0.131 0.193 0.194 0.245 0.393 0.582 0.241
Maximite without line Nos 0.016 0.111 0.173 0.173 0.192 0.336 0.525 0.220
MicroMite 40MHz 0.028 0.18 0.285 0.289 0.644 0.892 1.346 0.376
MicroMite 48MHz 0.023 0.15 0.237 0.24 0.536 0.744 1.121 0.313

st429 180Mhz 0.012 0.073 0.117 0.125 0.207 0.315 0.497 0.162
st407 168Mhz 0.010 0.067 0.104 0.111 0.195 0.290 0.443 0.146

MX470 120MHz MMBasic 0.013 0.082 0.135 0.135 0.265 0.380 0.597 0.174

st7 200Mhz 0.005 0.041 0.06 0.065 0.11 0.161 0.254 0.103





Not bad at all
It look like if we have a original PIC32 at 200Mhz , the result will be very close to
the st7 chip ...

You will get more info about the alpha release to the Uwe Becker (UB) page.
stm32f7 MMBasic port

I just send him the timer integration ,so you will get this release soon.
The project is compiled with System Workbench for stm32.

here the picture from the benchmark.




Cheers.

Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 06:04pm 14 Aug 2015
Copy link to clipboard 
Print this post

There is a newish pic32MZ "EF" variant , with a FPU ... don't know much bout it yet
but the datasheet is :

datasheet pic3MZxxEF
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 10:41pm 16 Aug 2015
Copy link to clipboard 
Print this post

Hi
Graphics with stm32f7 dma2d work great in MMBasic.
Resolution is 480 x 272 in 16bits color (The normal stm32f7 4.3" discovery screen)
The original random number was a little slow , i then use now the integrated RNG that
work a little faster.But as you will see in the benchmark , without random we get
double pixel / second ...
New instruction i want made in future are the double and triple buffer.
With dma2d you can copy one buffer (480x272) to another in 1.7mS and will be useful
if you like to program games

Here are the preliminary results :


1000 Clear screen with random color Benchmark
1751 mS : 571.102 per seconds

10000 random Empty Circle Benchmark
1134 mS : 8818.34 per seconds

10000 random Filled Circle Benchmark
3874 mS : 2581.31 per seconds

10000 random Empty Box Benchmark
1411 mS : 7087.17 per seconds

10000 random Filled Box Benchmark
3113 mS : 3212.34 per seconds

10000 random Line Benchmark
1231 mS : 8123.48 per seconds

10000 random Pixel Benchmark
636 mS : 15723.3 per seconds

No random used now

1000 Clear screen
1738 mS : 575.374 per seconds

10000 Empty Circle Benchmark
586 mS : 17064.8 per seconds

10000 Filled Circle Benchmark
2803 mS : 3567.61 per seconds

10000 Empty Box Benchmark
912 mS : 10964.9 per seconds

10000 Filled Box Benchmark
2607 mS : 3835.83 per seconds

10000 Line Benchmark
718 mS : 13927.6 per seconds

10000 Pixel Benchmark
319 mS : 31348 per seconds



As usual , you will get more info on the UB page :
stm32f7 maximite port.

Cheers.

Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 3387
Posted: 08:15am 23 Nov 2016
Copy link to clipboard 
Print this post

I've updated the chart with the data from the Micromite 5.2 code running on a PIC32MZ2048EFG064. As you can see it is faster than everything apart from the ST7 and that is despite calculating in double precision floating points rather than single. The ST chips have hardware floating point like the PIC32MZ

ABC 800 single precision 0.9 1.8 6.0 5.9 6.3 11.6 19.6 2.9
ABC 800 double precision 1.2 2.2 10.0 10.6 11.0 17.8 26.4 14.4
IBM PC 1.5 5.2 12.1 12.6 13.6 23.5 37.4 3.5
Apple III 1.7 7.2 13.5 14.5 16.0 27.0 42.5 7.5
VIC-20 1.4 8.3 15.5 17.1 18.3 27.2 42.7 9.9
ZX81 in "fast mode" 4.5 6.9 16.4 15.8 18.6 49.7 68.5 22.9

Maximite 0.016 0.144 0.196 0.205 0.354 0.512 0.721 0.310

Maximite with line Nos 0.016 0.131 0.193 0.194 0.245 0.393 0.582 0.241
Maximite without line Nos 0.016 0.111 0.173 0.173 0.192 0.336 0.525 0.220
MicroMite 40MHz 0.028 0.18 0.285 0.289 0.644 0.892 1.346 0.376
MicroMite 48MHz 0.023 0.15 0.237 0.24 0.536 0.744 1.121 0.313

st429 180Mhz 0.012 0.073 0.117 0.125 0.207 0.315 0.497 0.162
st407 168Mhz 0.010 0.067 0.104 0.111 0.195 0.290 0.443 0.146

MX470 120MHz MMBasic 0.013 0.082 0.135 0.135 0.265 0.380 0.597 0.174

st7 200Mhz 0.005 0.041 0.06 0.065 0.11 0.161 0.254 0.103

Micromite EXTREME 198MHz 0.006 0.045 0.07 0.08 0.141 0.201 0.287 0.126
Edited by matherp 2016-11-24
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 09:22am 23 Nov 2016
Copy link to clipboard 
Print this post

Can someone give me this benchmark program so I can run it on my port, please?
http://rittle.org

--------------
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 679
Posted: 09:28am 23 Nov 2016
Copy link to clipboard 
Print this post

  kiiid said   Can someone give me this benchmark program so I can run it on my port, please?


See page 1

regards
Michael
 
     Page 2 of 3    
Print this page
© JAQ Software 2020