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

PyPy looks interesting and it leaves me with a bunch of questions:

Is PyPy used a lot? Why don't we hear more about it? Does it support the same large ecosystem of packages? And does it have a GIL?



Another option is GraalPy (https://www.graalvm.org/python/) which is a Python JIT compiler. I've used it to embed an entire Python runtime in an application that's written in Scala which I then compiled to a native executable (https://www.graalvm.org/latest/reference-manual/native-image...) ending up with a zero-dependency single-file application that can execute and interact with arbitrary Python scripts.

As pointless benchmarks seem to be the thing, here's the numbers for different flavours of the one from the article with "10 20 30 40 50" as the args to make it a teeny bit more realistic:

C 27sec

Java 39sec 1.4x C

GraalPy 139sec 5.1x C

PyPy 252sec 9.3x C

CPython 1780sec 66.3x C

Not that this will tell you much about real-world use cases, of course, but hell, it's Friday afternoon...


it has a GIL; it supports all pure python packages; it has decent support for packages with compiled code, particularly the more popular ones

pypy is used in some interesting places; at some point development was sponsored by a sports betting arbitrage company; you can research a bit more starting from https://pypy.org/pypy-sponsors.html and reading the links from https://pypy.org/categories/sponsors.html


Thanks. One more question, I see that PyPy supports the CPython C API, so why aren't all compiled packages automatically supported?


i don't know enough to properly answer this

take a look at: https://doc.pypy.org/en/latest/cpython_differences.html#c-ap...




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

Search: