Re:I built a hardware processor that runs Python
by yanniszark on Monday April 28, 2025 @11:52AM
(#43822848)
Great work! :D
I had a question about that though.
Instead of compiling to PySM, why not compile directly to a real assembly like ARM?
Is the PySM assembly very special to accomodate python features in a way that can't be done efficiently in existing architectures like ARM?
[ Parent
| on HN ]
Re:I built a hardware processor that runs Python
by hwpythonner on Monday April 28, 2025 @12:36PM
(#43823317)
Thanks — appreciate it!
Good question. In theory, you can compile anything Turing-complete to anything else — ARM and Python are both Turing-complete. But practically, Python's model (dynamic typing, deep use of the stack) doesn't map cleanly onto ARM's register-based, statically-typed instruction set. PySM is designed to match Python’s structure much more naturally — it keeps the system efficient, simpler to pipeline, and avoids needing lots of extra translation layers.