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

PyPy isn't unloved, just incompatible. The routine experience with PyPy is that you try your toy benchmark, drop your jaw in amazement, then run your whole app and it fails. Usually it's because you have a upstream dependency on a native module without a PyPy port, or with an incompatible implementation (I've personally run into trouble with ctypes code that didn't quite work the same in PyPy).

But there are a non-trivial number of genuine behavioral differences too. A big delta is garbage collection. CPython is refcounted and greedy, you can write a loop doing more-than-just-heap allocation (like, opening files or something), and it works fine because objects get destroyed (closed) as they're no longer used. The same loop in PyPy runs into resource exhaustion because the relevant resource (file descriptors) runs out before the heap does and the GC doesn't run.

The community has tried to address this particular glitch with cryptic admonishments about using "with" that no one quite understands or can explain, but it hasn't taken and it remains true that PyPy basically doesn't work for anything big unless you develop in PyPy. And honestly I don't see a lot of attention to the issue, it's like PyPy doesn't think it has to be 100% compatible to win. Well, it does.

But getting back to my upthread poing: numba doesn't have those properties. Numba is just CPython, with the added feature that when you know you need a fast loop for something you write your python code to look like C and put a @jit decorator on it.



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

Search: