Calculation benchmark of micropython in different hardware

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Calculation benchmark of micropython in different hardware

Post by shaoziyang » Tue Aug 21, 2018 3:00 am

I have made a compare of calculation benchmark of micropython in different hardware, I hope it will be helpful to you.

Because forum does not support table, so I put result in a picture.
benchmark.jpg
benchmark.jpg (64.3 KiB) Viewed 6118 times
runtest.zip
(631 Bytes) Downloaded 223 times
I have made more test, and put it in github:

https://github.com/shaoziyang/micropython_benchmarks
Last edited by shaoziyang on Sun Aug 26, 2018 8:18 am, edited 1 time in total.

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: Calculation benchmark of micropython in different hardware

Post by jickster » Thu Aug 23, 2018 9:24 pm

shaoziyang wrote:I have made a compare of calculation benchmark of micropython in different hardware, I hope it will be helpful to you.

Because forum does not support table, so I put result in a picture.
benchmark.jpg
runtest.zip

You should place a link to a google spreadsheet (just make sure to make it readonly so only you can modify it).

Also if you’re really interested in providing a complete picture of performance, you should provide the info for each of the emitters: normal, native, viper

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Calculation benchmark of micropython in different hardware

Post by pythoncoder » Fri Aug 24, 2018 7:40 am

Interesting and informative information. It will be interesting to see how the forthcoming Pyboard D-series compares.
Peter Hinch
Index to my micropython libraries.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Calculation benchmark of micropython in different hardware

Post by Roberthh » Fri Aug 24, 2018 7:59 am

Very interesting is the comparison of the ESP32 modules with and without PSRAM. That matches the subjective impression, that devices w/o PSRAM are way more responsive.

chuckbook
Posts: 135
Joined: Fri Oct 30, 2015 11:55 pm

Re: Calculation benchmark of micropython in different hardware

Post by chuckbook » Fri Aug 24, 2018 11:10 am

pythoncoder wrote:
Fri Aug 24, 2018 7:40 am
Interesting and informative information. It will be interesting to see how the forthcoming Pyboard D-series compares.
without warranty: 216M, 1.547, 1.721, 2.839, 4.116 :-)

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Calculation benchmark of micropython in different hardware

Post by Roberthh » Fri Aug 24, 2018 2:11 pm

Just a few other numbers:
Teensy 3.6. 180Mhz, 2.65s, 2.78s, 4,14s, 12.2s
Pycom LoPy4: 160MHz, 5.75s, 6.07s, 10.1s, 17.6s
Pcom LoPy: 160MHz, 5.7s, 5.9s, 8.3s, ---
LoBo ESp32 SPRAM: 240MHz, 4.04s, 4.15s, 18.9s, 19.3s

The Pi test shows a substantial variation. The low values for the Div test of the ESP32LoBo & ESP32MP with PSRAM are somewhat strange, compared to e.g. the LoPy4 with PSRAM too (which runs at 160MHz).

tmz
Posts: 2
Joined: Fri Aug 24, 2018 10:43 am

Re: Calculation benchmark of micropython in different hardware

Post by tmz » Fri Aug 24, 2018 5:19 pm

Some more numbers from Pycom LoPy4
[code]
Pycom MicroPython 1.19.0.b2 [v1.9.4-7ec4c0a] on 2018-06-15; LoPy4 with ESP32
>>>
>>> import runtest
Speed test
System freq: 160.0 MHz
Add test: -5.654 s
Add test: -5.656 s
Mul test: -5.953 s
Mul test: -5.954 s
Div test: -10.008 s
Div test: -10.024 s
Pi test: -27.949 s
Pi test: -28.163 s
[/code]

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Calculation benchmark of micropython in different hardware

Post by Roberthh » Fri Aug 24, 2018 7:57 pm

I modified the test a little bit, packing into the loop 10 times the same operation (add, mul, div) and reducing the loop count by a factor of 10. Some sample numbers:
ESP32 MP : 204 MHz, 1.009 s, 1.201 s, 2.289 s, 8.514 s
ESP32 MP with PSRAM: 240.0 MHz, 1.308 s, 1.498 s, 6.74 s, 15.189 s
LoPy4: 160 MHz, 1.984 s, 2.286 s, 6.304 s, 17.756 s
WiPy2: 160MHz, 1.935 s, 2.231 s, 4.597 s, Fail
PyBoard 1.1: 168 MHz, 1.157 s, 1.312 s, 2.881 s, 10.344 s

Interestingly, on LoPy4 the Pi test in once instance took 47 seconds, but the 17 seconds figure is more consistent over test iterations and device.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Calculation benchmark of micropython in different hardware

Post by pythoncoder » Sat Aug 25, 2018 4:23 am

chuckbook wrote:
Fri Aug 24, 2018 11:10 am
...without warranty: 216M, 1.547, 1.721, 2.839, 4.116 :-)
Impressive figures.

But to quote from Basil Fawlty
where did you get that?
;)
Peter Hinch
Index to my micropython libraries.

chuckbook
Posts: 135
Joined: Fri Oct 30, 2015 11:55 pm

Re: Calculation benchmark of micropython in different hardware

Post by chuckbook » Sat Aug 25, 2018 4:07 pm

pythoncoder wrote:
Sat Aug 25, 2018 4:23 am
chuckbook wrote:
Fri Aug 24, 2018 11:10 am
...without warranty: 216M, 1.547, 1.721, 2.839, 4.116 :-)
Impressive figures.

But to quote from Basil Fawlty
where did you get that?
;)
To quote from Dr. Franklyn
I would love to tell you, but then, of course...
;-)

Post Reply