boochow / micropython-raspberrypi

bare metal Raspberry Pi Zero / Zero W port of MicroPython
MIT License
215 stars 24 forks source link

Is It really so slow ? #37

Open mtk11 opened 1 year ago

mtk11 commented 1 year ago

I just tried micropython-raspberrypi on RP1 and it seems to work quite slow. The results from pystone_lowmem.py:

Pystone(1.2) time for 500 passes = 853ms This machine benchmarks at 586 pystones/second

The result is compatible with a 64 MHz Cortex-M4 MCU, Has anyone performed similar testing ?

boochow commented 1 year ago

@mtk11 Yes, it is very slow. When I ran micropython on Raspbian, it was 8-9 times faster than the bare metal version. To speed it up, I probably need to enable instruction-cache / data-cache, branch predictor,etc. but I have not investigated yet.