I find it interesting that MicroPython's `re` module[0] is implemented with a backtracking regular expression engine from re1.5[1], instead of one of the linear-time engines from the same library. (Russ Cox covers the various engines in the excellent blog series[2] which re1 is a companion to.) I figure the choice was made due to binary size or memory constraints, though they're all quite small.
offtopic I am curious anyone tried using micropython to replace CPython o x86 servers?
analog31 · 42m ago
I've not used MicroPython, but its fork, CircuitPython. My impression is that it's essentially a Python that doesn't interact with an operating system. Thus if there's a reason for a server to have an OS and interact with it, the regular Python would be preferable.
I also don't know how much of the more advanced optimizations of Python are built into MicroPython. There's always a dilemma between making it performant, and making it micro.
[0]: https://github.com/micropython/micropython/tree/master/lib/r...
[1]: https://github.com/pfalcon/re1.5/tree/v0.8.2
[2]: https://swtch.com/~rsc/regexp/regexp2.html
I also don't know how much of the more advanced optimizations of Python are built into MicroPython. There's always a dilemma between making it performant, and making it micro.