While I enjoyed this article, and I clapped, it raised a big question that it didn’t answer: how much do you actually save by using MicroPython?
Python isn’t as fast as compiled languages, for sure — but why would MicroPython be any faster? Maybe it is, maybe it isn’t — I couldn’t find out.
What you’d really be saving is storage and memory. And that’s important. So what’s the comparison? What am I getting?
Because what I’d be giving up is fairly large. MicroPython offers a small subset of the standard library. More, the library modules mostly have different names — for example, the collections module is called ucollections
and not collections
. That’s the right choice, because they are actually similar but different libraries, but it means that the chances of my using an existing Python program without changes is basically zero.
MicroPython is also Python 3.5, which will not be receiving any more non-security updates, and is end-of-life in a few months. To be honest, that’s less important though.
Am I saying it isn’t worth it? Not at all!
MicroPython runs in 256k of code space and 16k of RAM — that’s amazingly small. My guess is that this is much, much fewer resources than a standard Python installation takes — but I don’t know for sure.
If you were to find out, even approximately, what these numbers were for a regular Python installation and put it into the article, I believe it would be much more convincing. If MicroPython is actually faster, some benchmark, no matter how hacky, would also be effective!
Thanks for a fascinating article! Next time I do IoT stuff, I’ll definitely take a serious look at MicroPython.