Hacker News new | ask | show | jobs
by robocaptain 3291 days ago
Coming from someone who uses python but doesn't really follow alternative compilers, PyPy sounds great. What are some of the downsides, if any? Are you sacrificing library compatibility for faster core+standard libs?
6 comments

In addition to being incompatible with (some) third-party libraries, pypy tends to use significantly more memory than cpython. It's also slower than cpython for scripts that don't run long enough to warm up the JIT, so you probably wouldn't want to use it by default. (Disclaimer: I'm basing this on experience with older versions of pypy and haven't verified it recently)
He memory thing is still an issue. I had to go thru. Lot of tuning on max GC size to keep it runnable for long times. Too low and it is slow and too high and it kills the box.
For workloads heavy on JSON operations PyPy has been slower than CPython for me in the past. Because it didn't benefit from the C implementation of simplejson.
In addition to the missing libraries, which has gotten a lot better in the last few years, it crashes a bit more.

I have a syslog proxy that has one huge incoming stream like 50k msgs/second. CPU Could not keep up with CPython but PyPy runs fine and crashes on some low level JIT assertion every so often. I have it setup to use PyPy on the high volume instances and CPython on the low volume instances.

JIT warm-up time can be problematic. Often (usually?), the code starts slower than CPython, but improves as the code paths are executed.
Numpy support is iffy. How is the Python 3 support these days?
Your favorite C-extension may not support it.