|
|
|
|
|
by BlackFingolfin
3291 days ago
|
|
The benchmark showing a factor 100x compares a pure python implementation of "pidigits" running in PyPy3 vs one that uses GMP (via gmpy2) in python. I am actually impressed it's only a factor 100. And with progress made by cffi, I'd hopeful that a GMP-using PyPy version could be written rhat matches the speed of the code using gmpy2. The next benchmark "only" runs 6x slower in PyPy ; still bad, but that paints quite a differen picture. |
|
For the record, I'm not claiming PyPy3 to be 100x slower, these are benchmarks and they're hairy beasts that we have to shave and try to see what they tell us about performance.
My point is that PyPy3 is still behind in language features (in CPython we have a lot of nice things from 3.6 and 3.7 coming soon, while PyPy still lags behind having the complete 3.5 feature set), and they haven't optimized it as much as their 2.7 branch. But the PyPy people are always showing those "7x faster than CPython" claims (which come from an average of benchmarks, which seems to have been cherry picked to avoid the ones in which they're actually slower than CPython).
On the other hand, with Cython moving over to Py3 was never an issue (it actually helped in some cases), and it always helped to deliver better performance, and in just the right spot where it's needed. True, you have to know about profiling and identifying where to use Cython, but at my workplace it's been a far better tool to solve our performance needs.