[SciPy-user] some benchmark data for numarray, Numeric and scipy-newcore
Gerard Vermeulen
gerard.vermeulen at grenoble.cnrs.fr
Sun Dec 4 16:25:24 CST 2005
I took a look at the difference between arange in numarray and scipy:
in numarray arange is a Python function which dispatches the real work
to a type dependent C function, whereas in scipy arange does
all calculations in C doubles, which are cast to the requested type.
This may explain why numarray's arange is 5 times faster than scipy's
arange on my system (don't ask me why David's results for numarray are
so slow).
As a side effect, numarray's arange works for complex numbers contrary
to scipy's arange.
Gerard
On Sun, 4 Dec 2005 15:40:58 -0600
Ted Horst <ted.horst at earthlink.net> wrote:
> I took a quick look at this in numarray and scipy (I don't have
> Numeric).
>
> It seems that numarray has separate lowest level functions for vector,
> vector multiplication and scalar, vector multiplication whereas scipy
> uses the same function for both. This results in an extra load double
> instruction being executed in scipy for the scalar, vector case.
>
> This is on a Powerbook G4, running OSX 10.3.9.
>
> Ted
>
> On Dec 3, 2005, at 21:07, Travis Oliphant wrote:
>
> > David M. Cooke 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
> >
> >
> > I like your version better.... :-) But, seriously, it does still
> > look
> > like something is going on for lines 4 and 7 that could be improved in
> > scipy core....
> >
> > -Travis
> >
> > _______________________________________________
> > SciPy-user mailing list
> > SciPy-user at scipy.net
> > http://www.scipy.net/mailman/listinfo/scipy-user
> >
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>
More information about the SciPy-user
mailing list