[pypy-dev] NumPyPy vs NumPy

Papa, Florin florin.papa at intel.com
Wed Jul 27 02:59:46 EDT 2016


Hi,

This is Florin Papa from the Dynamic Scripting Languages Optimizations Team at Intel Corporation.

I have been working with NumPyPy to evaluate its performance and it seems significantly slower compared to CPython NumPy or even PyPy NumPy (installed with pip). The results were gathered after running microbenchmarks inspired from here: http://www.labri.fr/perso/nrougier/teaching/numpy.100/

These benchmarks perform basic tasks, such as matrix multiplication, generate Cauchy matrix, generate Gaussian array, find min and max in matrix, convert float array to integer array in place, sum all elements in array. Please see below the results containing run time, normalized to the CPython NumPy results (baseline).

Benchmark   CPython NumPy   PyPy NumPy      PyPy NumPyPy
cauchy          1           5.838852812     4.866947551
pointbypoint    1           4.922654347     0.981008211
numrand         1           2.478997019     1.082185897
rowmean         1           2.512893263     1.062233015
dsums           1           33.58240465     1.013388981
vectsum         1           1.738446611     0.771660704
cauchy          1           2.168377906     0.887388291
polarcoords     1           1.030962402     0.500905427
vectsort        1           2.214586698     0.973727924
arange          1           2.045342386     0.69941044
vectoradd       1           5.447667037     1.513217941
extractint      1           1.655717606     2.671712185
float2int       1           3.1688          0.905406988
insertzeros     1           2.375043445     1.037504453

Is there an official benchmark suite for NumPy or a more relevant workload to compare against CPython? What is NumPyPy's maturity / adoption rate from your knowledge?

The benchmarks used to collect the results are attached in this mail.

Regards,
Florin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: numpy_bench.zip
Type: application/x-zip-compressed
Size: 6055 bytes
Desc: numpy_bench.zip
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20160727/003120bb/attachment.bin>


More information about the pypy-dev mailing list