SBC is based on STM32F7, but there are other CPUs on the market. Here we compare some of them to a common Python benchmark.
Benchmark
Since SBC is designed to run Python code, we compare the execution time of a complete Python code, known as pystone.
This benchmark has several parts to compare different Python operations like function calls, declarations, data type operations, etc.
Internally it contains less than 300 lines and looks like this:
Once executed, it measures the execution time in units of [pystones / second] and this measure can be used to compare between different platforms.
The complete source code can be found here: https://github.com/micropython/micropython-lib/blob/v1.9.3/pystone/pystone.py
After running the benchmark on different platforms, we got the following results:
Board | CPU | [pystones/sec] |
---|---|---|
PC | Intel | 200 |
OpenMVH7 | STM32H7 | 5.6 |
OpenH7 | STM32H7 | 3.6 |
Keyndrite | K210 | 2.9 |
OpenMV | STM32F7 | 2.5 |
SBC | STM32F7 | 1.9 |
RpPico | RP2040 | 1.08 |
Wemos | ESP32 | 1.04 |
Feather | NFR52 | 0.7 |
M5Stack | ESP32 | 0.66 |
NucleoL432 | STM32L4 | 0.33 |
In conclusion…
- The reference that we can all understand is the result from the PC platform, rated at 200 [pystones/sec].
- The range of microcontrollers varies from 0.5 to 5 [pystones/sec] and the SBC reaches 1.9, so it can run Python roughly 100 times slower than a PC.
- The SBC is also between the ESP32 and H7 devices, so it offers an average performance compared to the microcontrollers available on the market nowadays.