Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

PyPy and GraalPython also can offer significant speedups in certain workloads.


sort by: page size:

FWIW PyPy is signfificantly faster than CPython in a lot of tasks.

PyPy is much faster than CPython.

Interestingly, cPython is twice as fast as PyPy for me.

pypy has quicker start up than CPython and also has a JIT. They're working on interesting memory optimisations too.

If you want Python to go faster, use PyPy.

PyPy is actually very fast, ~10x faster than standard python.

I am wondering if PyPy is used somewhere for workloads that need performance.

Pypy is really fast.

if you're just looking to speed things up PyPy, and Cython are both good options

For algorithmic code PyPy can provide substantial speedups over CPython. I've used PyPy in code fingerprinting large bioinformatics files and seen big speedups. I've also tried porting a webapp processing JSON from CPython and seen no perceptible speedup.

I recently discovered that pypy3 can run all my day to day Python code. It has some issues with slightly different behavior from cpython when using threads but other than that I see a 4x speedup on most of my slowest pure python workloads (parsing large rdf files and reserializing them after computing a total order on all their nodes). Huge win for productivity.

It's the standard and best supported approach and the level of speedup you get from PyPy is significantly workload dependent.

PyPy seems to be 7x faster!

pypy is great (we use it at work for a few services), but it has slow startup/jit warm up, and uses crazy lots of ram. Once it warms up though, it is pretty darn fast (for python).

I think using Pypy instead of CPython will give you several times the performance boost as any of this.

PyPy is a much-faster drop-in replacement for CPython. I wish more people would use it.

PyPy is only twice as slow as v8 and is about an order of magnitude faster than CPython. It is quite an achievement. I would be very happy if CPython could get this performance but I doubt.

PyPy in general has much better performance than CPython.

I have turned to pypy quite extensively for pure-Python text processing tasks, where I often get a 10-100x speed up just by changing the command line invocation. For example, I wrote a proof of concept Rabin-Karp hashing approximate string matching algorithm to perform plagiarism analysis while I was working at Udacity in around 2017. The system never went into production, but pypy was super helpful in crunching all historical user submissions for analysis.

I’ve also had great success using pypy to accelerate preprocessing steps (when they don’t rely on incompatible c libraries) for machine learning pipelines. It’s the most painless performance enhancement trick in my toolbox before I reach for concurrency (in which case I reach for joblib or Dask).

The one oddity I’ve noticed is that using tuples (including things like named tuples) often speeds up CPython by a lot, but even plain tuples can slow down pypy on the same code—in some cases pypy winds up slower than CPython.

In any case, I’m low key in love with pypy, even though I can’t use it for _everything_.

next

Legal | privacy