|
From: | Søren Hauberg |
Subject: | Re: mean filter, another implementation |
Date: | Sun, 24 Jul 2005 17:41:03 +0200 |
User-agent: | Mozilla Thunderbird 1.0.2 (X11/20050404) |
Hi, Thanks for the info, I'll try it. Do you know why this should give me a speed-up? /Søren Dmitri A. Sergatskov wrote:
Søren Hauberg wrote:tic; mymeanfilter(data,n); toc ans = 2.9098I looked at .cc code -- you can probably speed it up by another 10% if you replace out(i) = sum/(double)n; with out(i) = w*sum; where const double w = 1.0/n; declared somewhere outside the loop. Regards, Dmitri.
------------------------------------------------------------- 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 -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |