Live data from Hacker News

Ask HN: Is anyone using PyPy for real work?

news.ycombinator.com

31–40 of 185 posts

Re: Ask HN: Is anyone using PyPy for real work?

#31
post #24

Earlier quoted context omitted.

Debian is its own worst enemy with things like this. It’s why we eventually moved off it at a previous job, because deploying Python server applications on it was dreadful. I’m sure it’s better if you’re deploying an appliance that you hand off and never touch again, but for evolving modern Python servers it’s not well suited.

Yes 1000x What is it with them which makes them feel entitled to have special "dist-packages" vs "site-packages" as is the default? This drives me nuts, when I have a bunch of native packages I want to bundle in our in-house python deployment. CentOS and Ubuntu are vanilla, and only Debian (mind-boggingly) deviates from the well-trodden path. I still haven't figured out how to beat this dragon. All suggestions welcom…

I usually make a venv in ~/.venv and then activate it at the top of any python project. Makes it much easier to deal with dependencies when they're all in one place.

Re: Ask HN: Is anyone using PyPy for real work?

#32
post #29

I use it for data transformation, cleanup and enrichment. (TXT, CSV, Json, XML, database) to (TXT, CSV, JSON, XML, database). Speed up of 30x - 40x. The highest speedup on those that require logic in the transformation. (lot of function calls, numerical operations and dictionary lookups).

Similar. I was working on some ETL work with SQLite, and now PyPy is my regular tool for getting better performance at similar jobs.

Re: Ask HN: Is anyone using PyPy for real work?

#33
post #26

We don't. To be honest, I didn't realize PyPy supported Python 3. I thought it was eternally stuck on Python 2.7. So the good: It apparently now supports Python 3.9? Might want to update your front page, it only mentions Python 3.7. The bad: It only supports Python 3.9, we use newer features throughout our code, so it'd be painful to even try it out.

I think it supports up to 3.10, as there are official docker images for this version, I saw them this morning.

Maybe the site is not up to date ?

Re: Ask HN: Is anyone using PyPy for real work?

#34

I use CPython most of the time but PyPy was a real lifesaver when I was doing a project that bridged EMOF and RDF, particularly I was working with moderately sized RDF models (say 10 million triples) with rdflib. With CPython, I was frustrated with how slow it was, and complained about it to the people I was working with, PyPy was a simple upgrade that sped up my code to the point where it was comfortable to work wit…

That is a great idea! I use rdflib frequently and never thought to try it with PyPy. Now I will.

Re: Ask HN: Is anyone using PyPy for real work?

#35
post #24

Earlier quoted context omitted.

Debian is its own worst enemy with things like this. It’s why we eventually moved off it at a previous job, because deploying Python server applications on it was dreadful. I’m sure it’s better if you’re deploying an appliance that you hand off and never touch again, but for evolving modern Python servers it’s not well suited.

Yes 1000x What is it with them which makes them feel entitled to have special "dist-packages" vs "site-packages" as is the default? This drives me nuts, when I have a bunch of native packages I want to bundle in our in-house python deployment. CentOS and Ubuntu are vanilla, and only Debian (mind-boggingly) deviates from the well-trodden path. I still haven't figured out how to beat this dragon. All suggestions welcom…

dist packages are a must for software written in Python that is part of the distribution itself.

Re: Ask HN: Is anyone using PyPy for real work?

#36
post #26

We don't. To be honest, I didn't realize PyPy supported Python 3. I thought it was eternally stuck on Python 2.7. So the good: It apparently now supports Python 3.9? Might want to update your front page, it only mentions Python 3.7. The bad: It only supports Python 3.9, we use newer features throughout our code, so it'd be painful to even try it out.

It supports Python3.10 now too. Thanks, I updated the site.

Re: Ask HN: Is anyone using PyPy for real work?

#37
post #26

We don't. To be honest, I didn't realize PyPy supported Python 3. I thought it was eternally stuck on Python 2.7. So the good: It apparently now supports Python 3.9? Might want to update your front page, it only mentions Python 3.7. The bad: It only supports Python 3.9, we use newer features throughout our code, so it'd be painful to even try it out.

Their docs seem perpetually out of date, but they recently released support for 3.10. I haven't been able to try it recently because our projects use 3.10 features but in the past it was easily a 10-100x speedup as long as all the project's libraries worked.

https://downloads.python.org/pypy/

Re: Ask HN: Is anyone using PyPy for real work?

#38
post #5
post #3

I use PyPy quite often as a 'free' way to make some non-numpy CPU-bound Python script faster. This is also the context for when I bring up PyPy to others. The biggest blocker for me for 'defaulting' to PyPy is a) issues when dealing with CPython extensions and how quite often it ends up being a significant effort to 'port' more complex applications to PyPy b) the muscle memory for typing 'python3' instead of 'pypy3'.

For the b) part, you should consider creating alias for that command, if it really might lead for you to not use it otherwise.

I had the same thought. For years I have aliased ‘p’ for ‘python’ and after reading this thread I will alias ‘pp’ for ‘pypy’.
Post reply on HN