help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A faster sum


From: Victor Eijkhout
Subject: Re: A faster sum
Date: Sat, 21 May 2005 16:33:30 -0400


On May 21, 2005, at 4:19 PM, Keith Goodman wrote:

So does it make sense to modify the built-in function sum to use
matrix multiplication?

I wouldn't do it.

I'm still a bit surprised. The multiplication approach takes twice as many operations, but it's probably faster because it uses Atlas, which tries to optimize use of bandwidth, cache lines, number of registers &c. Since the memory behaviour is more important than the actual efficiency of operations (to a degree), I guess the Atlas matrix-vector multiply will be more efficient.

However, this depends on all sorts of assumptions about architecture. I'd leave the code the way it is, and preserve this as a bit of 'octave folklore'.

V.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]