[Numpy-discussion] Running benchmark on AMD64: Strange results

Nadav Horesh NadavH at VisionSense.com
Sun Jan 22 03:17:05 CST 2006


I ran benchmark.py from the "Numpy x Matlab: some synthetic benchmarks"
thread (the first version), on a amd64 machine (dual-core athlon 4400+,
1GB RAM) running either win64 or gentoo linux (dual boot). And got a
strange results in the  dimension 500 matrix multiplication benchmark:

On windows:

Tests    x.T*y   x*y.T     A*x     A*B   A.T*x    half   2in2

Dimension: 5
Array   0.7547  0.2491  0.1939  0.2688  0.8351  0.6387 0.8398
Matrix  6.4227  1.3667  0.7070  0.8192  1.4211  2.2491 3.3690
NumArr  1.7175  3.0416  0.3539  3.0406  5.0468  4.3359 7.0414
Numeri  0.8756  0.2918  0.2639  0.3418  0.6445  0.5888 0.6953

Dimension: 50
Array   7.8431  1.5494  0.7105 12.9425  6.4525  2.1420 2.4210
Matrix 69.4642  2.8870  1.2589 13.6162  7.1357  3.7315 4.9553
NumArr 17.6435  4.6267  0.9372 33.3093  6.6129  4.7710 7.5562
Numeri  9.3534  1.6228  1.0502 12.9967  5.4694  0.9972 2.0816

Dimension: 500
Array   1.1935  6.7593  1.6090 129.6738 12.8805 1.6672  2.0153   <--
Matrix 12.6622  6.8386  1.6488 129.8621 12.6773 1.9591  2.1887   <--
NumArr  2.2546  7.5078  1.0158 545.9313  7.6133 0.6549  1.4395   <--
Numeri  1.3390  6.8766  1.2113 133.2397 12.7436 0.5740  1.7577   <--

On linux:

Dimension: 5
Array   0.7500  0.1600  0.1600  0.1800  0.7200  0.5900  0.7900
Matrix  5.9600  1.1800  0.5900  0.6300  1.2700  2.1500  3.3200
NumArr  1.9400  0.4500  0.4300  0.4600  5.4100  4.6500  7.4600
Numeri  0.9100  0.2200  0.2100  0.2400  0.5200  0.4400  0.5600

Dimension: 50
Array   7.8700  1.5900  0.6900 25.9800  7.9200  2.3700  2.6300
Matrix 67.1700  2.8100  1.1500 26.5000  8.4700  3.9500  5.2000
NumArr 20.0700  1.6200  0.9500 10.4400  7.8400  5.3500  8.2600
Numeri  9.4300  1.7700  0.7400 26.1000  9.6500  0.7700  3.1500

Dimension: 500
Array   1.2200  4.6700  1.0700 1188.6400 15.3500  2.5000  2.8100   <--
Matrix 13.1100  4.7800  1.1000 1052.9200 15.3500  2.6000  2.9100   <--
NumArr  2.4700  7.5800  1.1900 76.7100   13.0600  1.8400  3.6600   <--
Numeri  1.3700  7.3900  1.2400 1068.0200 14.6800  1.3600  3.5200   <--

Numeric/numpy matrix multiplication is about 8 fold slower on linux, and
about 7 fold fast with numarray.

Configuration:
On win64 I used the provided binaries for numarray1.5, numpy0.92 and
scipy 4.4 (compiled for P4+sse2)
On linux I used numarray 1.5.1 (from cvs) numpy0.92, and scipy0.44, all
compiled from source for 64 bits, and linked with ATLAS 3.7.11 (linking
with ACML provided roughly the same figures).

Any idea were this huge performance factor came from?

  Nadav.






More information about the Numpy-discussion mailing list