Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : BASIC Speed Benchmark Tests

   Page 3 of 8    
Posted: 09:43am
23 Nov 2016
Copy link to clipboard
isochronic
Guru

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 2016-11-24
 
Posted: 10:03am
23 Nov 2016
Copy link to clipboard
WhiteWizzard
Guru

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)
 
Posted: 10:10am
23 Nov 2016
Copy link to clipboard
WhiteWizzard
Guru

@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!
 
Posted: 12:13pm
23 Nov 2016
Copy link to clipboard
matherp
Guru

  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
 
Posted: 12:20pm
23 Nov 2016
Copy link to clipboard
WhiteWizzard
Guru

  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?
 
Posted: 08:17pm
23 Nov 2016
Copy link to clipboard
MicroBlocks
Guru


  WhiteWizzard said  
  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.
 
Posted: 04:25am
01 Jan 2017
Copy link to clipboard
Tinine
Guru

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)
 
Posted: 06:28pm
06 Aug 2018
Copy link to clipboard
lizby
Guru

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:

[code]
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

[/code]

Here's the C code. If anyone spots anything I did wrong, I'll be happy to fix and rerun.
[code]
// 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);
} [/code]
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 2018-08-08
 
Posted: 12:32pm
08 Aug 2018
Copy link to clipboard
JohnS
Guru

  lizby said   ESP32 C benchmark.


Maybe test a BASIC that runs on the ESP32.

Did you prevent the C compiler from doing optimisations? (And preferably also check the code to see it has done so?)

I'm not actually sure the point of running the C versions, especially without doing them for other chips (RPi, ST429 etc) as it's not news that compiled C runs a lot faster than interpreted Basic :)

(Bear in mind there is no chance to run MBasic on the Arduino so C was about the only option.)

  lizby said   Now if it just ran MMBasic.


Get the source code and change it if that's what you want :)

JohnEdited by JohnS 2018-08-09
 
Posted: 12:49pm
08 Aug 2018
Copy link to clipboard
lizby
Guru

  JohnS said  Get the source code and change it if that's what you want :)


Sure, sure, just like snapping my fingers.
Edited by lizby 2018-08-09
 
Posted: 01:25pm
08 Aug 2018
Copy link to clipboard
matherp
Guru

There is nothing I can see to stop MMBasic running on the ESP32 it is just 2 or 3 hundred hours of slog work to make it happen. Then you have to consider the development environments- Arduino: c..p, native: unknown quantityEdited by matherp 2018-08-09
 
Posted: 03:19pm
08 Aug 2018
Copy link to clipboard
JohnS
Guru

  lizby said  
  JohnS said  Get the source code and change it if that's what you want :)


Sure, sure, just like snapping my fingers.

Not at all - but who else is going to do it? And - bearing in mind the other choices - why?

John
 
Posted: 09:04pm
30 Jan 2020
Copy link to clipboard
Volhout
Guru

Just for the fun of it, i typed in the benchmark program in RiscOS BBC basic on the pi zero.
To get comprehensive timer values i ran each test 1000000 times.
Here are the results.

Bm1 : 0.0016
Bm2 : 0.0063
Bm3 : 0.0159
Bm4 : 0.0134
Bm5 : 0.0150
Bm6 : 0.0291
Bm7 : 0.0292
Bm8 : 0.0357

Roughly 10x as fast as a maximite
Edited 2020-01-31 07:10 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Posted: 10:10am
26 Jul 2020
Copy link to clipboard
twofingers
Guru


CMM2 (400 MHz) just for fun and completeness:

Bm1 : 0.0022
Bm2 : 0.0205
Bm3 : 0.0333
Bm4 : 0.0378
Bm5 : 0.0644
Bm6 : 0.0887
Bm7 : 0.1293
Bm8 : 0.0604

Nearly the speed of a Arduino UNO running "C".
 
Posted: 10:16am
26 Jul 2020
Copy link to clipboard
matherp
Guru

CMM2 (480MHz) using latest V5.05.04RC12 firmware

Bm1 : 0.0016
Bm2 : 0.0151
Bm3 : 0.0241
Bm4 : 0.0280
Bm5 : 0.0502
Bm6 : 0.0689
Bm7 : 0.0966
Bm8 : 0.0456
 
Posted: 01:31pm
31 Oct 2020
Copy link to clipboard
matherp
Guru

CMM2 (400MHz) using latest V5.05.06RC11 firmware with the GOSUB entry point changed to a label rather than a line number - Don't ever use line numbers on the CMM2 if you want performance


Bm1 : 0.00073 compared to Maximite 1: 21.8x
Bm2 : 0.01534 compared to Maximite 1: 7.2x
Bm3 : 0.02288 compared to Maximite 1: 7.5x
Bm4 : 0.02583 compared to Maximite 1: 6.7x
Bm5 : 0.02822 compared to Maximite 1: 6.8x
Bm6 : 0.04109 compared to Maximite 1: 8.1x
Bm7 : 0.06813 compared to Maximite 1: 7.7x
Bm8 : 0.03327 compared to Maximite 1: 6.6x

CPU clock ratio 5.0x
 
Posted: 02:27pm
31 Oct 2020
Copy link to clipboard
twofingers
Guru


Hi Peter,

good job!

I think we should maybe have our own, more comprehensive benchmark that also includes string + memory handling, graphics, and more. With this we could measure whether optimizations achieve something.

Michael
 
Posted: 01:04pm
02 Nov 2020
Copy link to clipboard
ChrisJournoud
Newbie

  matherp said  There is nothing I can see to stop MMBasic running on the ESP32 it is just 2 or 3 hundred hours of slog work to make it happen. Then you have to consider the development environments- Arduino: c..p, native: unknown quantity<edited><editID>matherp</editID><editDate>43320.9854513889</editDate></edited>


It could be interesting on a device like this : https://fr.aliexpress.com/item/33014937190.html?spm=a2g0o.cart.0.0.45523c00WhKTHm&mp=1
Sadly i have not the knowlegge neither the skills to do the port  
Edited 2020-11-02 23:10 by ChrisJournoud
 
Posted: 08:20pm
22 May 2021
Copy link to clipboard
toml_12953
Guru

  BobD said  
  shoebuckle said   Running the benchmarks on my Maximite produced a 10% speed increase. I wonder why.



the electrons are probably frozen in the US and running slower.


Nope, it's now 32 deg. here in May and still slower.  
 
Posted: 09:09pm
22 May 2021
Copy link to clipboard
Mixtel90
Guru


Benchmarks have been quoted ever since computers started - and they still don't mean much. It used to be a skill, writing benchmarks that made a particular computer look better than anyone else's.  :)  At best they give a *very rough* guide.

String handling: don't run into garbage collection on an old computer or the result is meaningless, even on that machine. Unless you are testing for the efficiency of garbage collection, of course. :)
 
   Page 3 of 8    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025