Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: BASIC Speed Benchmark Tests Post ReplyPost New Topic
<< Prev Page of 5 Next >>
Author
Message << Prev Topic | Next Topic >>
darthmite
Senior Member
Senior Member
Avatar

Joined: 20 November 2011
Location: France
Online Status: Offline
Posts: 238
Posted: 17 August 2015 at 8:41am | IP Logged Quote darthmite

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 ;)


Back to Top View darthmite's Profile Search for other posts by darthmite
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2492
Posted: 23 November 2016 at 6:15pm | IP Logged Quote matherp

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 on 23 November 2016 at 6:39pm
Back to Top View matherp's Profile Search for other posts by matherp
 
kiiid
Guru
Guru
Avatar

Joined: 11 May 2013
Location: United Kingdom
Online Status: Offline
Posts: 667
Posted: 23 November 2016 at 7:22pm | IP Logged Quote kiiid

Can someone give me this benchmark program so I can run it on my port, please?
Back to Top View kiiid's Profile Search for other posts by kiiid Visit kiiid's Homepage
 
twofingers
Guru
Guru


Joined: 02 June 2014
Location: Germany
Online Status: Offline
Posts: 625
Posted: 23 November 2016 at 7:28pm | IP Logged Quote twofingers

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


See page 1

regards
Michael
Back to Top View twofingers's Profile Search for other posts by twofingers
 
chronic
Guru
Guru


Joined: 21 January 2012
Location: Australia
Online Status: Offline
Posts: 616
Posted: 23 November 2016 at 7:43pm | IP Logged Quote chronic

The MZ EF pipelining is optimised for 32-bit instead of
the 64-bit double precision. A 32-bit MZ EF MMBasic would be even faster
I think. [Presumably the ST test would be a fair bit slower using dp ? maybe the
ST7 FPU is only single precision]

Edited by chronic on 23 November 2016 at 7:45pm
Back to Top View chronic's Profile Search for other posts by chronic
 
WhiteWizzard
Guru
Guru


Joined: 05 April 2013
Location: United Kingdom
Online Status: Offline
Posts: 2698
Posted: 23 November 2016 at 8:03pm | IP Logged Quote WhiteWizzard

Can anyone tell me the current consumption of the 'basic' ST7 (compared to 135mA for the Extreme).

By the way - has the 'MM Extreme' name been 'approved' by Geoff? We seem to have adopted it here on TBS so am just wondering . . . . I think it is a good name! OR 'MicroMite Harmony' maybe (sorry kiiid)

__________________
For everything MicroMite visit MicroMite.org

Direct Email: WhiteWizzard@MicroMite.org
Back to Top View WhiteWizzard's Profile Search for other posts by WhiteWizzard Visit WhiteWizzard's Homepage
 
WhiteWizzard
Guru
Guru


Joined: 05 April 2013
Location: United Kingdom
Online Status: Offline
Posts: 2698
Posted: 23 November 2016 at 8:10pm | IP Logged Quote WhiteWizzard

@matherp

If you understand how the MZ can run at 252MHz (as kiiid indicates), could you re-post those timings!!
Would be interesting to see how they then compare to the ST7.

And if you do have it clocked at 252MHz, can I please ask my usual question regarding current consumption Thanks!

__________________
For everything MicroMite visit MicroMite.org

Direct Email: WhiteWizzard@MicroMite.org
Back to Top View WhiteWizzard's Profile Search for other posts by WhiteWizzard Visit WhiteWizzard's Homepage
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2492
Posted: 23 November 2016 at 10:13pm | IP Logged Quote matherp

Quote:
f you understand how the MZ can run at 252MHz


The current MZ processors are limited to 200Mhz - anything greater is overclocking. The next range (NOT YET ANNOUNCED) may well be faster
Back to Top View matherp's Profile Search for other posts by matherp
 
WhiteWizzard
Guru
Guru


Joined: 05 April 2013
Location: United Kingdom
Online Status: Offline
Posts: 2698
Posted: 23 November 2016 at 10:20pm | IP Logged Quote WhiteWizzard

Quote:
The next range (NOT YET ANNOUNCED) may well be faster


Come on, we're running out of names So how long before the MM NYA?

__________________
For everything MicroMite visit MicroMite.org

Direct Email: WhiteWizzard@MicroMite.org
Back to Top View WhiteWizzard's Profile Search for other posts by WhiteWizzard Visit WhiteWizzard's Homepage
 
MicroBlocks
Guru
Guru
Avatar

Joined: 12 May 2012
Location: Thailand
Online Status: Offline
Posts: 2192
Posted: 24 November 2016 at 6:17am | IP Logged Quote MicroBlocks

WhiteWizzard wrote:
Quote:
The next range (NOT YET ANNOUNCED) may well be faster


Come on, we're running out of names So how long before the MM NYA?

Micromite Ludicrous. :)


__________________
Microblocks. Build with logic.
Back to Top View MicroBlocks's Profile Search for other posts by MicroBlocks
 
Tinine
Regular Member
Regular Member


Joined: 30 March 2016
Location: United Kingdom
Online Status: Offline
Posts: 72
Posted: 01 January 2017 at 2:25pm | IP Logged Quote Tinine

Happy New Year to all!


Just for giggles, I ran a similar BM on the ByPic which runs, interactively on the PIC32MX170 @40MHz. Not pure BASIC, though, so I had to adapt.

BM1: 0.001
BM2: 0.010
BM3: 0.023
BM4: 0.020
BM5: 0.027
BM6: 0.041
BM7: 0.080
BM8: 0.043



//ByPic Benchmark tests
//PIC32MX170 @40MHz

// No GOTO available so substituted a do-until
// No GOSUB available so substituted a function call "fourthou()" for "Gosub 4000"

// Created separate functions for each BM

dim j, timer, a, l#, s#, q

function bm1()
print "Benchmark 1\n"
j=0
timer = tick()

for j = 1 to 1000
next

print tick()-timer
endf
// Total execution time: 0.000968 (<1ms)

function bm2()
print "Benchmark 2\n"
j=0
timer = tick()

do
     j=j+1
until j=1000

print tick()-timer
endf
// Total execution time: 0.0093 (<10ms)

function bm3()
print "Benchmark 3\n"
j=0
timer = tick()

do
     j=j+1
     a = j/j*j+j-j
until j=1000

print tick()-timer
endf
// Total execution time: 0.0231 (~23ms)

function bm4()
print "Benchmark 4\n"
j=0
timer = tick()

do
     j=j+1
      a = j/2*3+4-5
until j=1000

print tick()-timer
endf
// Total execution time: 0.0198 (<20ms)

function fourthou()
return 6
endf

function bm5()
print "Benchmark 5\n"
j=0
timer = tick()

do
     j=j+1
     a = fourthou()
      a = j/2*3+4-5
until j=1000

print tick()-timer
endf
// Total execution time: 0.0273 (<28ms)

function bm6()
print "Benchmark 6\n"
j=0
timer = tick()

do
     j=j+1
     a = fourthou()
      a = j/2*3+4-5
    for q = 1 to 5
    next
until j=1000

print tick()-timer
endf
// Total execution time: 0.0409 (~41ms)


function bm7()
print "Benchmark 7\n"
j=0
timer = tick()
dim ray2(6)
do
     j=j+1
     a = fourthou()
      a = j/2*3+4-5
    for q = 1 to 5
          ray2(q) = a
    next
until j=1000

print tick()-timer
endf
// Total execution time: 0.0803 (~80ms)

function bm8()
print "Benchmark 8\n"
j=0
timer = tick()

do
     j=j+1
      a = j^2
     l# = log(j)
     s# = sin(j)
until j=1000

print tick()-timer
endf
// Total execution time: 0.0432 (~43ms)
Back to Top View Tinine's Profile Search for other posts by Tinine
 
lizby
Senior Member
Senior Member


Joined: 17 May 2016
Location: United States
Online Status: Offline
Posts: 297
Posted: 07 August 2018 at 4:28am | IP Logged Quote lizby

ESP32 C benchmark.

Well, this thread hasn't been posted to in a year and 7 months, and this post is using a (slight) modification of the Arduino C code which twofingers posted for benchmarking the ESP32 module, ESP-32S NodeMCU Development Board 2.4GHz, but here goes.

I increased the number of loops to 100000 so I could get sort of rational numbers:


                         BM1     BM2     BM3     BM4     BM5     BM6     BM7     BM8 
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 No 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
 
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 

ESP32S NodeMCU module    0.00007 0.00007 0.00030 0.00011 0.00016 0.00016 0.00016 0.02413
 


Here's the C code. If anyone spots anything I did wrong, I'll be happy to fix and rerun.

// ESP32 Benchmark; copy of twofingers Arduino Benchmark: 
//   https://www.thebackshed.com/forum/forum_posts.asp?TID=4685
// Compare to http://cpcwiki.eu/index.php/BASIC_Benchmark 
// is working with UNO, MEGA and DUE 
// No warranty, provided at your own risk. 
// This sample may be freely distributed without charge  
// twofingers at TBS 08-2014 

const int BAUD_RATE = 9600, LOOPS=1000; 
float j, a, m, blog, csin; 
float ms,sum_ms; 
int q; 
float ray[5]; 

void G4000(void) {} 

void setup() { 
  Serial.begin(BAUD_RATE); 


void loop() { 

  Serial.println("Arduino Benchmark tests"); 
  Serial.println(" "); 
  Serial.println("Benchmark 1"); 
  ms = millis(); 
  sum_ms=0; 
  for (j = 1; j <= LOOPS; j++) 
  { 
  } 
  Serial.println((millis() - ms) / 1000, 4); 
  sum_ms =+ millis() - ms, 
  delay(1000); 

  Serial.println("Benchmark 2"); 
  ms = millis(); 
  j = 0; 
BM2: 
  j++; 
  if (j < LOOPS) 
  { 
    goto BM2; 
  } 
  Serial.println((millis() - ms) / 1000, 4); 
  sum_ms =+ millis() - ms; 
  delay(1000); 

  Serial.println("Benchmark 3"); 
  ms = millis(); 
  j = 0; 
BM3:; 
  j++; 
  a = j / j * j + j - j; 
  if (j < LOOPS) 
  { 
    goto BM3; 
  } 
  Serial.println((millis() - ms) / 1000, 4); 
  sum_ms =+ millis() - ms; 
  delay(1000); 

  Serial.println("Benchmark 4"); 
  ms = millis(); 
  j = 0; 
BM4:; 
  j++; 
  a = j / 2 * 3 + 4 - 5; 
  if (j < LOOPS) 
  { 
    goto BM4; 
  } 
  Serial.println((millis() - ms) / 1000, 4); 
  sum_ms =+ millis() - ms; 
  delay(1000); 

  Serial.println("Benchmark 5"); 
  ms = millis(); 
  j = 0; 
BM5:; 
  j++; 
  m = j / 2 * 3 + 4 - 5; 
  G4000(); 
  if (j < LOOPS) 
  { 
    goto BM5; 
  } 
  Serial.println((millis() - ms) / 1000, 4); 
  sum_ms =+ millis() - ms; 
  delay(1000); 

  Serial.println("Benchmark 6"); 
  ms = millis(); 
  j = 0; 
BM6:; 
  j++; 
  m = j / 2 * 3 + 4 - 5; 
  G4000(); 
  for (q = 1; q <= 5; q++) 
  { 
  } 
  if (j < LOOPS) 
  { 
    goto BM6; 
  } 
  Serial.println((millis() - ms) / 1000, 4); 
  sum_ms =+ millis() - ms; 
  delay(1000); 

  Serial.println("Benchmark 7"); 
  ms = millis(); 
  j = 0; 
BM7:; 
  j++; 
  m = j / 2 * 3 + 4 - 5; 
  G4000(); 
  for (q = 1; q <= 5; q++) 
  { 
    ray[q] = m; 
  } 
  if (j < LOOPS) 
  { 
    goto BM7; 
  } 
  Serial.println((millis() - ms) / 1000, 4); 
  sum_ms =+ millis() - ms; 
  delay(1000); 

  Serial.println("Benchmark 8"); 
  ms = millis(); 
  j = 0; 
BM8:; 
  j++; 
  m = pow(j, 2); 
  blog = log(j); 
  csin = sin(j); 
  if (j < LOOPS) 
  { 
    goto BM8; 
  } 
  Serial.println((millis() - ms) / 1000, 4); 
  sum_ms =+ millis() - ms; 
  Serial.print("Avg: "); 
  Serial.println(sum_ms/8/1000,4); 
  Serial.println(); 
  Serial.println("Arduino Benchmark"); 
  Serial.println("F i n i s h e d !"); 
  Serial.println(); 
  while(1); 
}

This is with the ESP32 module with wifi and bluetooth which I have been able to get for under $5 U.S. Now if it just ran MMBasic.

Edited by lizby on 07 August 2018 at 4:31am
Back to Top View lizby's Profile Search for other posts by lizby
 


<< Prev Page of 5 Next >>
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.2188 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.22