On 2/3/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Stephen Simmons wrote: > > > The question though is whether all of the inner loop's overhead is > > necessary. > > My counterexample using numpy.dot() suggests there's considerable scope > > for improvement, at least for certain common cases. > > Well, yes. You most likely have an ATLAS-accelerated dot(). The ATLAS put a > lot > of work into making matrix products really fast. However, they did so at a > cost: > different architectures use different code. That's not really something we can > do in the core of numpy without making numpy as difficult to build as ATLAS > is. > Maybe this argument could be inverted: maybe numpy could check if ATLAS is installed and automatically switch to the numpy.dot(numpy.ones(a.shape[0], a.dtype), a) variant that Stephen suggested.
Of course -- as I see it -- the numpy.ones(...) part requires lots of extra memory. Maybe there are other downsides ... !? -Sebastian _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion