Re:LPython: Novel, Fast, Retargetable Python Compiler
by abecedarius on Saturday July 29, 2023 @01:38PM
(#36922568)
I guess I'd put it like "LPython compiles a type-annotated Python subset (dialect? variant?) to optimized machine code. Interop with CPython is easy: arbitrary Python code can go in the same source file using a decorator." -- just as an example to try to be helpful -- of course you know your system and I don't. It sounds really cool and I'm wishing you luck.
Re:LPython: Novel, Fast, Retargetable Python Compiler
by certik on Saturday July 29, 2023 @02:05PM
(#36922859)
Thank you! I opened up an issue to do this: https://github.com/lcompilers/lpython/issues/2220.
If you have some ideas how to best communicate this, let me know.
The best approach that I know right now is to say that we support a strict subset of Python, and if it compiles, it will be fast. The rest of Python you have to call explicitly and it will be slow and you get a CPython dependency in the binary that we generate, but you can do it. That way there is a clear distinction what gets compiled via our compiler into high performance machine code and what gets dispatched via CPython (it will eventually get "compiled", but it will just call CPython).