[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
conv2 performance
From: |
John W. Eaton |
Subject: |
conv2 performance |
Date: |
Sun, 28 Feb 2010 10:53:19 -0500 |
I recieved a complaint that Octave's conv2 function is about 5 times
slower than Matlab's. By making a few simple changes, I was able to
improve the perfromance some, but not by a factor of 5. My changes
are here:
http://hg.savannah.gnu.org/hgweb/octave/rev/dc8637fd7a76
On my system, I see the following improvement after these changes:
> n = 1024; m = 64; x = rand(n,n); k = rand(m,m); tic; y = conv2(x,k); toc
old: Elapsed time is 26.2576 seconds.
new: Elapsed time is 13.6104 seconds.
and
> n = 1024; m = 512; x = rand(n,1); k = rand(m,1); m = rand (m,n);
> tic; y = conv2(x,k,m); toc
old: Elapsed time is 8.53273 seconds.
new: Elapsed time is 3.27103 seconds.
Maybe there is still room for improvement here. I would happily use a
free software library with a GPL-compatible license to implement this
function, but I don't know whether one is available.
jwe
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- conv2 performance,
John W. Eaton <=