Re:A Python Interpreter Written in Rust
by hathawsh on Saturday February 02, 2019 @03:19PM
(#19065433)
Actually I was referring to manual translation of Python code to Rust. My experience with PyPy has been rather bad, unfortunately (it runs my code at less than half the speed of CPython) and I figure human translation should be a lot more effective than JIT optimization.
Re:A Python Interpreter Written in Rust
by antpls on Saturday February 02, 2019 @03:47PM
(#19065617)
Maybe you should send your code to the PyPy team. I bet they will look into it and see how they could improve their JIT compiler. Last time I checked the project, they had a full benchmark running for each release to spot regressions and to track improvements
Re:A Python Interpreter Written in Rust
by nickpsecurity on Saturday February 02, 2019 @03:22PM
(#19065448)
"What you are describing is simply a JIT compiler."
The user is describing the opposite of a JIT compiler: a gradual rewrite of Python apps in Rust to feed into an ahead-of-time, highly-optimizing compiler. A JIT compiler would do quick compiles of Python code while it's running. The performance, reliability, and security capabilities of JIT vs AOT vary considerably with context. For predictability and security, I avoid JIT's wherever possible in favor of AOT's.
What you are describing is simply a JIT compiler. Maybe are you suggesting to rewrite PyPy (its C part) in Rust?