[SciPy-User] performance python

Rajeev rajs2010@gmail....
Tue Jun 1 05:46:27 CDT 2010


Hi,

I was trying to run the codes given at http://www.scipy.org/PerformancePython
and I got the following errors for blitz

/usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/mathfunc.h:
45: error: ‘labs’ is not a member of ‘std’

/usr/lib/python2.5/site-packages/scipy/weave/blitz/blitz/funcs.h:509:
error: call of overloaded ‘abs(int&)’ is ambiguous

However I could get the result for rest of the cases (except pyrex and
psyco) -

On my desktop pc, I got

Doing 100 iterations on a 1000x1000 grid
numeric took 6.16 seconds
fastinline took 1.7 seconds
fortran77 took 1.71 seconds
fortran90-arrays took 2.19 seconds
fortran95-forall took 2.18 seconds
slow (1 iteration) took 8.17 seconds
100 iterations should take about 817.000000 seconds
You don't have Psyco installed!

For C++,
Enter nx n_iter eps --> 1000 100 1e-16
nx = 1000, ny = 1000, n_iter = 100, eps = 1e-16
0.326132
Iterations took 3.93 seconds.

For matlab,
>> tic; laplace; toc
Elapsed time is 7.750676 seconds.

With octave,
octave:3> tic; laplace; toc
Elapsed time is 15.6242 seconds.

On another machine which is a cluster for parallel computation with 32
nodes, I got the following

numeric took 7.64 seconds
fastinline took 3.42 seconds
fortran77 took 3.56 seconds
fortran90-arrays took 2.38 seconds
fortran95-forall took 2.39 seconds
slow (1 iteration) took 6.33 seconds
100 iterations should take about 633.000000 seconds
You don't have Psyco installed!

For C++,
Enter nx n_iter eps --> 1000 100 1e-16
nx = 1000, ny = 1000, n_iter = 100, eps = 1e-16
0.326132
Iterations took 6.05 seconds.

For octave,
octave:1> tic; laplace; toc
Elapsed time is 15.9253 seconds.

Can someone explain the relative difference of performance? Also we
should add an example with cython. Meanwhile please help me with the
error in blitz.

Best wishes,
Rajeev


More information about the SciPy-User mailing list