View Single Post
Posts: 1,269 | Thanked: 3,961 times | Joined on May 2011 @ Brazil
#3
Benchmark of Python & SciPy on some mobile devices :
- XPS15 : Dell XPS 15 L502X, Core i7 2670QM 4 cores @ 2.2-3.1 GHz, 1+6 MB cache L2/L3, 8GB RAM DDR3 1,333 MHz, 1TB 5,400 RPM SATA hard drive. Ubuntu 12.04 64 bits, Python 2.7.3, NumPy 1.6.1, SciPy 0.9.0;
- A1215B : Asus 1215B, AMD C-50 2 cores @ 1.0GHz, 1 MB cache L2, 2GB RAM DDR3 1,066 MHz, 320 GB 5,400 RPM SATA hard drive. Ubuntu 14.04 64 bits, Python 2.7.6, NumPy 1.8.2, SciPy 0.13.3;
- A1005HA : Asus 1005HA, Atom N270 @ 1.6 GHz, 512 KB cache L2, 2GB RAM DDR2 667 MHz, 250 GB 5,400 RPM SATA hard drive. XUbuntu 14.04 32 bits, Python 2.7.6, NumPy 1.8.2, SciPy 0.13.3;
- N9 : Nokia N9, TI OMAP 3630 ARM Cortex A8 @ 1.0 GHz, 1GB RAM. MeeGo Harmattan, Python 2.6.6, Numpy 1.9.0, SciPy 0.14.0;
- N900 : Nokia N900, TI OMAP 3430 ARM Cortex A8 @ 600 MHz, 256 MB RAM. Maemo 5, Python 2.5.4, NumPy 1.4.0, SciPy 0.7.1. Easy Debian with Python 2.6.6, NumPy 1.4.1, SciPy 0.7.2;
- N810 : Nokia N810, TI OMAP 2420 ARM11 @ 400 MHz, 128 MB RAM. Maemo 4, Python 2.5.2. Easy Debian with Python 2.6.6, NumPy 1.4.1, SciPy 0.7.2.

1) SciPy FFT of a vector (10^6 elements) :
Code:
import time
t1=time.time()
import numpy as np
from scipy import fft
from scipy import fftpack
t2=time.time()
print "NumPy&SciPy import : %f s" % (t2-t1)
d = np.linspace(0, 1e3, 1e6)
t3=time.time()
print "NumPy linspace 10**6 : %f s" % (t3-t2)
fft(d)
t4=time.time();
print "SciPy FFT 10**6 : %f s" % (t4-t3)
fftpack.fft(d)
t5=time.time();
print "SciPy FFTPack 10**6 : %f s" % (t5-t4)
XPS15 : 0.106/0.0571 s
A1215B : 0.678/0.342 s
A1005HA : 1.03/0.499 s
N9 : 3.80/1.79 s
N900 : 6.83/3.63 s
N810 : 50.7/23.1 s (Easy Debian)

2) Triple numerical integral of (x*y*z)**(x+y+z) :
Code:
import time
t1=time.time()
from scipy.integrate import tplquad
t2=time.time()
print "SciPy tplquad import : %f s" % (t2-t1)
result = tplquad(lambda x, y, z: (x*y*z)**(x+y+z), 0, 1, lambda y: 0, lambda y: 1, lambda y, z: 0, lambda y, z: 1)
t3=time.time();
print "SciPy tplquad (x*y*z)**(x+y+z) : %f s" % (t3-t2)
print result
XPS15 : 5.32 s
A1215B : 28.6 s
A1005HA : 45.1 s
N9 : 119 s
N900 : convergence error with SciPy 0.7.1 on Maemo, 466s (Easy Debian)
N810 : 992 s (Easy Debian)
The same integral calculated by SymPy takes : 1212s on Nokia N810, 591s on Nokia N900, 121s on Nexus 4.

Conclusions from the above Python & NumPy calculations :
- N9 @ 1.0 GHz is 80%-3x% faster than N900 @ 600 MHz, greater than 66.67% expected by clock only;
- N9 is 7x-12x faster than N810;
- N900 is 1.1-6.4x faster than N810;
- Asus 1005HA (a netbook released in October 2008) with Atom N270 @ 1.6 GHz CPU is 1.6-2.7x faster than N9, 5.6-9.3x faster than N900, 21-48x faster than N810;
- Asus 1215B (a low-end notebook in 2012) with AMD C-50AMD C-50 CPU is 3.2-4.6x faster than N9, 9-15x faster than N900, 34-74x faster than N810;
- Dell XPS 15 L502X (a high-end notebook in 2012) with Core i7 2670QM CPU is 21-35x faster than N9, 63-87x faster than N900, 185-477x faster than N810.

See also benchmark of Python & NumPy on some mobile devices.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
Sailfish : Sony Xperia X, Gemini, Jolla, Jolla C, Jolla Tablet, Nexus 4. Nokia N9, N900, N810.

Last edited by rcolistete; 2014-10-22 at 21:14. Reason: Added timings for Asus 1005HA
 

The Following 3 Users Say Thank You to rcolistete For This Useful Post: