Live data from Hacker News

Ask HN: Is anyone using PyPy for real work?

news.ycombinator.com

51–60 of 185 posts

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

#51
I don’t use it, but I’d like to.

The big obstacle is that for while we would have multiple execution environments. It’s not like we could flip a switch and all Dockerfiles are using PyPy.

Plus I don’t think AWS Lambda supports it.

If I could go back in time, we would use it from the beginning.

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

#52
My biggest issue is that DataDog doesn’t support PyPy. Out of curiosity, I made a new branch of our app and took out DataDog and observed a significant improvement in performance when using PyPy vs CPython on the same branch (but can’t remember how much).

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

#53
I don’t actually use PyPY, but I’m very aware of it. My understanding is that the only reason to use PyPy instead of the default Python is for performance gains. For the vast majority of projects I work on, the performance of our code on the CPU is almost never the bottleneck. The slowness is always in IO, databases, networks, etc.

That said, if I do ever run into a situation where I need my code to perform better, PyPy is high on my list of things to try. It’s nice to know it’s an option.

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

#55
post #25

I use it at work for a script that parses and analyzes some log files in an unusual format. Wrote a naive parser with a parsing combinator library. It was too slow to be usable with CPython. Tried PyPy and got a 50x speed increase (yes, 50 times faster). Very happy with the results, actually =)

Thanks for the feedback. It does seem like parsing logs and simulations is a sweet spot for PyPy

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

#56
post #31
post #24

Earlier quoted context omitted.

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.

second this and it's what I do on all Linux distros, just run it inside .venv as the site-installation.

if you need extra dependencies that pip can not do well in the .venv case, Conda can help with its own and similar site-based installation.

I don't know how it is different in the python installation case between ubuntu and debian, they seem the same to me.

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

#57
post #31
post #24

Earlier quoted context omitted.

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.

i am a big fan of .venv/ -- except when it takes ~45 mins to compile the native extension code in question -- then I want it all pre-packaged.

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

#58
When I worked at Transit App, I built a backend pre-processing pipeline to compress transit and osm data in python [1] and also another pipeline to process transit map data in python [2]. Since the Ops people complained about how long it took to compress the transit feeds (I think London took 10h each time something changed), I migrated everything to Pypy. Back then that was a bit annoying cuz it meant I had to remove numpy as a requirement, but other than that there were few issues. Also it meant we were stuck on 2.7 for quite a while, so long that I hadnt prepared a possible migration to 3.x. The migration happened after I left. Afaik they still use pypy.

Python is fun to work with (except classes…), but its just sooo slow. Pypy can be a life saver.

[1] https://blog.transitapp.com/how-we-shrank-our-trip-planner-t... [2] https://blog.transitapp.com/how-we-built-the-worlds-pretties...

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

#59
post #43

If it was relatively up to date with Python3 I'd use it, but as it lags behind considerably I avoid it, even for personal work.

Python 3.10 is too old for your work?

In fact no, Python 3.10 is OK new enough.

There is still the lag though, Python 3.10 was out for quite a while before PyPy supported 3.10.

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

#60

Hey, you might want to delete the link to https://mesapy.org/rpython-by-example in https://doc.pypy.org/en/latest/architecture.html as it is pointing to a resource that people are unable to access.

Thanks, that should have been https://mssun.github.io/rpython-by-example/index.html. Fixing.
Post reply on HN