6 ms·
At work, I use PyPy to run a Luigi server for our data pipeline. It gave us a pretty dramatic decrease in latency and allowed us to scale our workload with a tr
by daveFNbuck 9y ago
At work, I use PyPy to run a Luigi server for our data pipeline. It gave us a pretty dramatic decrease in latency and allowed us to scale our workload with a trivial change. It's unfortunate you can't choose your interpreter, but when you can it's pretty easy to just test both and see which one is faster.
I also use it at home to solve Project Euler problems. For anything that takes more than half a second or so, it's usually a big win and can turn minutes into seconds.
- Myrmornis 9y agoDo any of the Project Euler questions actually require lengthy computation, or is that more a sign that one should be looking for some mathematical insight that leads to a more efficient computation?
- xapata 9y agoPyPy won't change your data structures and algorithms, so it's not finding mathematical insight.
- Myrmornis 9y agoYes that’s the point I was making. Maybe you intended your comment to be a sibling to mine.
- xapata 9y agoMore likely I missed your point.
- daveFNbuck 9y agoIt seems that you're saying that I should be finding mathematical insight instead of using PyPy, while xapata is saying that if my code runs fast in PyPy then I've already found enough mathematical insight.
- daveFNbuck 9y agoMost of them don't require lengthy computation, but some of them did for me. I know at least some of the time that's because I didn't know enough math, but sometimes I had the same algorithm as the other people in the solution thread but with much slower runtimes. I think numpy gives a bigger speedup than PyPy for a lot of the problems.
- gsam 9y ago> For anything that takes more than half a second or so, it's usually a big win and can turn minutes into seconds. As a counter to this, I purposefully try to use CPython in order to force me to find algorithmically optimal solutions. It's a useful way to learn.
- daveFNbuck 9y agoHaving a faster interpreter also allows me to play with the numbers more to get a better feel and understanding for the problem. I think that's the point of Project Euler, but I understand your point of view.