logoalt Hacker News

mattipyesterday at 8:01 AM4 repliesview on HN

Third party libraries like SciPy scikit-learn, pandas, tensorflow and pytorch have been critical to python’s success. Since CPython is written in C and exposes a nice C API, those libraries can leverage it to quickly move from (slow) python to (fast) C/C++, hitting an optimum between speed of development and speed of runtime.

PyPy’s alternative, CFFI, was not attractive enough for the big players to adopt. And HPy, another alternative that would have played better with Cython and friends came too late in the game, by that time PyPy development had lost momentum.


Replies

toxikyesterday at 8:09 AM

PyPy on numpy heavy code is often a lot slower than CPython

show 1 reply
glkindlmannyesterday at 1:25 PM

Sorry can you explain more the connection between PyPy and CFFI (which generates compiled extension modules to wrap an existing C library)? I have never used PyPy, but I use CFFI all the time (to wrap C libraries unrelated to Python so that I can use them from Python)

show 1 reply
jjgreenyesterday at 6:52 PM

I rather like Python and have used the C API extensively, "nice" is not the word I'd choose ...

pjmlpyesterday at 6:58 PM

Python was already widely deployed before them, thanks to Zope, and being a saner alternative to Perl.