Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think using Pypy instead of CPython will give you several times the performance boost as any of this.


Now you have 10 problems.

A reference to the classic line, oft attributed to JWZ:

"Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems".

The point being, switching from CPython to PyPy does not simply give you the performance boost and that's it. It comes with its own tradeoffs, including:

(a) trading speed for much more memory consumption

(b) slower C FFI - important for all kinds of Python workflows (e.g. Pandas, Numpy, and so on)

(c) behind mainline CPython releases, and with subtle incompatibilities

(d) slower startup times (due to the JITting involved)

(e) different garbage collection model (and less predictable)

(f) less support (from companies, distros, etc), fewer ports, less manpower to port quickly to new platforms (e.g. Apple's M1).


Pypy is not a drop-in replacement for CPython. It does not support many libraries that rely on C extensions, and targets a slightly older version of the language.


Assuming pypy does what it says it does: Python -> RPython -> C -> LLVM Clang -> LLVM IR -> 'JIT', you're still paying a large tax compared to something like RPython -> Some IR -> 'JIT'


I think you've misinterpreted something. The pypy interpreter is written in rpython, but executed code itself never gets translated to rpython.


Likely, but it doesn't work with all applications.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: