2 ms·
Viper is an interesting approach on speeding up Python. It's developed for MicroPython, which does give them room for breaking changes, but has trade-offs. Ar
by shakna 9y ago
Viper is an interesting approach on speeding up Python.
It's developed for MicroPython, which does give them room for breaking changes, but has trade-offs.
Arithmetic is much faster, but dictionary lookups take much longer compared to CPython.
Viper is a code-emitter from a large subset of Python, and even allows for inline assembly. But it's only for a few architectures at the moment, like ARM and x86.
- cromat3 9y agoViper is called Zerynth today: https://wiki.python.org/moin/Zerynth https://wiki.python.org/moin/Zerynth
- shakna 9y agoThey're similar, but not the same. Zerynth is a development suite. Notably, it makes use of a VM. Viper is just one of the code emitters buried inside the MicroPython source code, like here [0]. Notably, it produces native code, not bytecode for a VM. [0] https://github.com/micropython/micropython/blob/master/py/objfun.c#L417 https://github.com/micropython/micropython/blob/master/py/ob...