[SciPy-user] some benchmark data for numarray, Numeric and scipy-newcore

Gerard Vermeulen gerard.vermeulen at grenoble.cnrs.fr
Sun Dec 4 04:04:06 CST 2005


On Sat, 3 Dec 2005 20:31:10 -0500
"David M. Cooke" <cookedm at physics.mcmaster.ca> wrote:

> These are my numbers. They don't support the above conclusions :-)  
> This is on an Athlon 64 3200+, running Debian. Numeric and numarray  
> are from Debian unstable.
> 
> cookedm at arbutus$ py bench.py 12
> Numeric-24.2
> numarray-1.4.0
> scipy-core-0.7.4.1550
> benchmark size = 12  (vectors of length 16777216)
> label            Numeric       numarray     scipy.base
>      1             0.5642          1.086          0.541
>      2              1.044          1.952         0.8472
>      3             0.7367         0.7428         0.6201
>      4              1.965         0.8811           2.45
>      5              1.048         0.9061         0.9241
>      6             0.7419         0.7496         0.5371
>      7              1.972          1.293          2.412
>      8              1.222           0.94         0.9529
>      9              23.99          13.65          13.16
>     10              14.96          13.65          11.42
>     11              10.86          10.61          9.056
> TOTAL               59.1          46.47          42.92
>

OK, my system is:
[packer at titan BUILD]$ uname -a
Linux titan.rozan.fr 2.6.11-13mdksmp #1 SMP Mon Nov 28 12:22:08 MST 2005 i686 Intel(R) Pentium(R) 4 CPU 3.60GHz unknownGNU/Linux

Attached you'll find modified bench.py to give a little bit more sysinfo,
such as optimization flags.

I have built a Python interpreter in my home to install the latest stuff
and it makes things worse for scipy.base:

[packer at titan BUILD]$ python bench.py 12
Importing test to scipy
Importing base to scipy
Importing basic to scipy
Python 2.4.2 (#1, Dec  4 2005, 08:21:04)
[GCC 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)]
Optimization flags: -DNDEBUG -O3 -march=i686
CPU info: getNCPUs=2 has_mmx has_sse has_sse2 is_32bit is_Intel is_Pentium is_PentiumIV
Numeric-24.2
numarray-1.4.1
scipy-core-0.7.4.1560
benchmark size = 12  (vectors of length 16777216)
label            Numeric       numarray     scipy.base
    1             0.4004        0.07397         0.3918
    2             0.2715         0.2429         0.5111
    3             0.1973         0.1738         0.4461
    4             0.8764         0.5438          2.045
    5             0.3005         0.2441         0.2861
    6             0.1982         0.1726         0.4462
    7              0.884         0.6183          2.047
    8             0.6277         0.4362          0.425
    9              9.515          7.626           8.76
   10              9.556          8.057          8.768
   11              7.865          6.319          7.336
TOTAL              30.69          24.51          31.46

Note that I have set -march=i686 to have comparable performance with Mandrake's
default Python environment (Python's default flags result in a performance loss
of about 50 %).
I did not tweak any flags during the installation of the Numerical extensions.


Conclusion:
Comparing our numbers I would qualify Numeric and numarray as 32bit-friendly
and scipy.base as 64bit-friendly. Interestingly, the first seven lines involve
integer arrays and the overall worse performance of scipy.base with respect to
Numeric is due to those seven lines (I tried to pass NX.Int32 into arange() to
force an 'i' dtypechar but that made no difference).

Gerard


PS:
for reference I summarize my results for my systems default Python,
numararray and Numeric:
[packer at titan ~]$ python bench.py 12
Importing test to scipy
Importing base to scipy
Importing basic to scipy
Python 2.4 (#2, Feb 12 2005, 00:29:46)
[GCC 3.4.3 (Mandrakelinux 10.2 3.4.3-3mdk)]
Optimization flags: -DNDEBUG -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro  -g
CPU info: getNCPUs=2 has_mmx has_sse has_sse2 is_32bit is_Intel is_Pentium is_PentiumIV
Numeric-23.1
numarray-1.2.3
scipy-core-0.7.1.1526
benchmark size = 12  (vectors of length 16777216)
label            Numeric       numarray     scipy.base
    1             0.4343        0.07348         0.4021
    2             0.2653         0.2483         0.5149
    3              0.192         0.1848         0.4531
    4               1.01         0.5386          2.058
    5             0.2721         0.2533         0.2669
    6             0.1921         0.1865         0.4619
    7              1.024         0.6261          2.067
    8             0.6308         0.4323         0.4145
    9              10.35          7.564          8.773
   10              10.34          7.998          8.766
   11              8.489          6.282          7.367
TOTAL               33.2          24.39          31.55

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bench.py
Type: application/octet-stream
Size: 3477 bytes
Desc: not available
Url : http://www.scipy.net/pipermail/scipy-user/attachments/20051204/1f084796/bench-0001.obj


More information about the SciPy-user mailing list